Reference Script In Other Script "type or namespace nae 'myScript' cannot..."
I have 2 scripts in the same folder. In my Camera2DFollow script, this line works:
public CharacterControl control;
However, in my CharacterControl script, this line does not work:
public Camera2DFollow cameraScript;
It gives me the following error:
Assets/Scripts/CharacterControl.cs(9,16): error CS0246: The type or namespace name `Camera2DFollow' could not be found. Are you missing a using directive or an assembly reference?
I see know reason for it to do this, as they are almost identical codes.
Do you have a class or struct with the name Camera2DFollow? Are you sure it's spelled correctly?
Yes; it is Camera2DFollow, the one with the unity standard 2d assets, just heavily modified.
So i guess it's not in a namespace, sometimes when i miss a parenthesis or semicolon in the script i get this error. You could try reimporting the script or moving it from your game folder and moving it back in.