public static void Remove(GameObject gameObject) { GameObject Parent = (GameObject)Iterator.GetParent(gameObject); if (Parent != null) { Parent.Remove(gameObject); if (Parent.GetFirstChild() == null) { Parent.RemoveBox(); Remove(Parent); } Parent.Update(); } }