Skip to content

Instantly share code, notes, and snippets.

@N-Carter
Created November 5, 2012 12:36
Show Gist options
  • Save N-Carter/4016973 to your computer and use it in GitHub Desktop.
Save N-Carter/4016973 to your computer and use it in GitHub Desktop.
Find Missing Scripts by Richard Fine (SuperPig)
// By Richard Fine
[MenuItem("Tools/Find missing scripts")]
public static void FindMissingScripts()
{
var allTransforms = FindSceneObjectsOfType(typeof (Transform));
foreach(Transform t in allTransforms)
{
if(t.gameObject.GetComponents<Component>().Any(c => !c))
Debug.LogError("One or more scripts on " + t.gameObject + " is missing.", t.gameObject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment