Exemplo n.º 1
0
 public override void Destroy()
 {
     for (int i = 0; i < this.ChildNodes.Count; i++)
     {
         UnityNodeBase child = this.ChildNodes[i];
         child.Destroy();
     }
 }
Exemplo n.º 2
0
        public override void Destroy()
        {
            for (int i = 0; i < this.ChildNodes.Count; i++)
            {
                UnityNodeBase child = this.ChildNodes[i];
                child.Destroy();
            }

            //Destroy gameobject after all children have destroyed themselves.
            UnityEngine.Object.Destroy(this.gameobject);
        }