Its a common and frustrating one, we've all came across it when starting out when tinkering with scripts etc when we have a few things going on in our projects, and it can be a frustrating search to find the source of the problem..

This usually comes up, when you either edit scripts, delete or move them around the place.

Don't go pulling your hair out, or delete the whole lot just yet before trying this

this script will now put a new menu item under Window > FindMissingScriptsRecursively

ok once thats saved, run your game until you get the error....pause the game... (not stop)

go to Window > FindMissingScriptsRecursivelythis will pop up a new window.

select all the game objects in your heirarchy, then in that window that popped up, press the only button thats there for 'Find Missing Scripts in selected GameObjects'

now, this will search all the selected game objects and tell you where there is a missing reference. and the results will be shown in the console window.

you may see something like this (just an error that ive made up)done_explosion_enemy(Clone) has an empty script attached in position: 3Searched 43 GameObjects, 136 components, found 2 missing

when looking at that, since your game is paused you can highlight the mentioned game object within your heirarchy that listed on first line. (in our example case : done_explosion_enemy(Clone))so in our example error, its saying that there is a missing script in position 3, since you have highlighted the game object, its components are visible in the inspector... so position 3 is the third component down from the top (ie transform component is 1st etc)

you will see a yellow triangle warning on the component indicating a problem..

so you can now fix it, by either checking your spelling the script and class exactly the same, or drag and drop the mising script onto the component again