Can't add script component 'Foo' because the script class cannot be found.
Make sure that there are no compiler errors and the file name and class name match.
'Foo' is missing the class attribute 'ExtensionOfNativeClass'!
The script don't inherit a native class that can manage a script.
Make sure your script is saved, then follow these steps:
Can't add script behaviour 'Foo'. The script needs to derive from MonoBehaviour!
The script is an editor script.