// Use this for initialization void Start() { gui = FindObjectOfType(typeof(GUIManager)) as GUIManager; //var myroot = this.transform.root; // This will get us the PersonPlatform myPersonPlatformScript = FindParentWithTag(this.gameObject, "PersonPlatform").GetComponent<PersonPlatformScript>(); // myroot.GetComponentsInChildren<PersonPlatformScript>(); //if (personPlatformScript.Length == 1) treePersonIndex = myPersonPlatformScript.treePersonIndex; }
// Use this for initialization void Start() { gui = FindObjectOfType(typeof(GUIManager)) as GUIManager; //var myroot = this.transform.root; // This will get us the PersonPlatform myPersonPlatformScript = FindParentWithTag(this.gameObject, "PersonPlatform").GetComponent <PersonPlatformScript>(); // myroot.GetComponentsInChildren<PersonPlatformScript>(); //if (personPlatformScript.Length == 1) treePersonIndex = myPersonPlatformScript.treePersonIndex; }