duck

duck

Feb 24th, 2011
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. foreach (Transform t in rootObj.GetComponentsInChildren<Transform>())
  2. {
  3.     MonoBehaviour[] scripts = t.GetComponents<MonoBehaviour>();
  4.     Debug.Log("Child Obj: "+t.name+" ("+scripts.Length+" scripts:");
  5.     foreach (MonoBehaviour script in scripts)
  6.     {
  7.         Debug.Log("    "+script);
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment