void VisitToCreateScriptNode_r(GameObject go) { MonoBehaviour[] scripts = go.GetComponents <MonoBehaviour>() as MonoBehaviour[]; foreach (MonoBehaviour script in scripts) { var node = new ScriptNode(); node.Initialize(script, containerTable); if (!graphNodeTable.Contains <ScriptNode>(node.InstanceId)) { graphNodeTable.Add(node.InstanceId, node); } } for (int i = 0; i < go.transform.childCount; i++) { VisitToCreateScriptNode_r(go.transform.GetChild(i).gameObject); } }