I have created a slider that moves a box back and forth, and the Unity applications WORKS. But i still get this errocode.
This is the class (simplified)
I have run into this mysterious message a couple time and have tracked it down to a bugged .js file. It seems to be rare and random.
If there is nothing wrong with the code and everything seems fine: - Backup the contents of the script - Delete the script - Recreate the script and past back the contents
The next time you run your project you shouldn't recieve the error.
Clearing the contents of the script and re-pasting it won't work. The file needs to be deleted and remade.
answered Jul 30 '10 at 11:22 AM
I can conform the Answer of SteveTwo.
Backing up, deleting, recreating and pasting was the sollution for me as well.
answered Mar 23 '11 at 07:56 AM
In my situation, it was a legitimate error that I was able to fix - c# project btw
I had both a ScriptableObject and MonoBehaviour with [ExecuteInEditMode]. The ScriptableObject had a property I was declaring AND initializing at the same time that relied on the MonoBehaviours singleton instance to be set:
It was calling for a singleton instance on the MonoBehaviour object at design time before Awake or Start had been called. The Instance getter/setter of the singleton had to look for a GameObject in the scene if the instance hadn't been set yet and bam, there was the problem.
All I had to do was remove the initialization of the property to a point that was AFTER the Awake() commands had run through the scene.
answered May 08 '12 at 03:54 PM