public void DeleteNode(object node) { //if (EditorUtility.DisplayDialog("Delete Elements?", "This element has one or more sub-elements, are you sure you want to delete them?", "Okay", "Cancel")) BaseNode curNode = (BaseNode)node; nodes.Remove(curNode); curNode.DestroyThis(); }