A picture is worth a thousand words… I get a load of :
“The referenced script on this Behaviour is missing”
But while trying to track it down I turned everythig off, and I still get it…???[8585-_main.unity±++unity+sotrth+main±+pc,+mac+&+linux+standalone.jpg|8585]
First this are not errors, they are warnings. When you press the play button Unity will save the current scene (serialize it) and reloads it immediately when entering playmode. The saved scene will also be loaded again when you exit playmode so the scene is in it’s initial state.
Unity can’t create some of the scripts you have attached to some objects because you deleted / moved / renamed one or multiple scripts outside of Unity or you loaded a scene from a different project but the scripts aren’t available. The components are still attached to the gameobjects in the scene, but it’s just an empty hull because the actual code is missing.
Unfortunately there’s no automated way to find such missing MonoBehaviour-components. You have to check your objects manually. If your scene contains a lot objects you can try putting the whole content of your scene into a prefab, delete everything in the scene and drag the prefab back in. I’ve never tried this but i’ve read a couple of times that this should work. Watch out: If you have prefabs in your scene they will of course loose their prefab connection since a new prefab is created. I would recommend to backup the whole project before you try this.
For the future: Never move, delete or rename any asset outside of Unity because it will break the asset connection in the Unity AssetDatabase.
You have to select one warning at a time in the console window and as you select it, the object(s) that is the culprit will be highlight in yellow briefly in the hierarchy. Find the mono behaviour components that you have attached to them. In each mono behaviour component there should be a script attached in order for it to do anything. You must have a script attached to your mono behaviour components to lose this warning.
You get those errors after you crashed and all the scripts that used to be on game objects are missing. Just look at all the game objects and re-import the scripts that used to be there.
Hope this helps.
After some more experimenting, i can report that its something else tan reported here.
I selected my terrain, Copy, and pasted JUST the terain inot now script… It had 4 >scripts on it, I deleted them, and STILL I get ONE yellow warning-
There 12 more like that, and Ill happily delete and reimport everything if its an asset, >or a script, but A) I cant find anything, B) Im not sure it IS that, the warning doesnt >even tell me a file name, looks like something called monoBehaviour.ccp but thats >no-where on my machine…
If you copy and paste stuff outside of unity it will lose the scripts you attached to it. This will also cause these warnings. Stuff used to have scripts attached to them. But Unity lost track of them and gone missing.