- Home /
Monobehavior is acting weird, Need a hand
I made a few scripts today and then I wanted to add my new GameManagerScript to an empty gameobject. but then Unity tells me it has to derive from monobehavior, which is odd because it does. when I look closer at the error message it not even the script I'm trying to attach it make the error for, I look at both scripts and both a monobehavior. Also I didn't do anything to the script HeroStateMachine today and it worked just fine until now.
How do I find out what is going on?
Answer by Bunny83 · Jan 02, 2019 at 09:46 AM
Are you sure that you don't have any compiler errors in any of your scripts?
If there is a single error somewhere. All your scripts can't be compiled. Keep in mind that all your scripts are compiled into a single assembly file.
Thanks that helped me out, I had this in a movementscript; Vector3 curPos.lastPos;
it was supposed to be this Vector3 curPos, lastPos;
Unity tricked me with that error message :)