Missing scripts#

Missing Scripts can mean a number of things:


You can find the GameObject by clicking the warning in the Console window. Note that it may be an asset or prefab; move the Console window so the Project window is also visible, and try again.
I also have provided a script to search complete projects for missing scripts in prefabs and scenes1.

The script has been deleted on purpose#

If the script is no longer relevant, remove the placeholder component from the GameObject.

If you're unsure what script it was, you may have luck looking at the YAML of the scene or asset. Attempt to identify recognisable features like variables names, then use them to search your project for the missing script.

If you can't actually remove the component from the object, you can run GameObjectUtility.RemoveMonoBehavioursWithMissingScript to get rid of them1.

Fixing issues with an existing script#

If the script is in the project but can't be added to an object, follow these steps to correct those issues.

Reassigning a script#

You can re-assign a missing script by dragging a valid MonoBehaviour or ScriptableObject script file into the missing Script field; variables from the previously assigned script may be recovered if done correctly.

  1. FindMissingObjects editor script that adds 3 menu items under ToolsMissing Objects.