Created
November 5, 2012 12:36
-
-
Save N-Carter/4016973 to your computer and use it in GitHub Desktop.
Find Missing Scripts by Richard Fine (SuperPig)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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