public void clearChilds()
{
foreach (ScriptableObject node in childs)
if(Application.isEditor)
ScriptableObject.DestroyImmediate (node);
else
ScriptableObject.Destroy (node);
childs.Clear();
}
public void draw() { EditorGUILayout.HelpBox("Select a content for this node" + "or leave it empty to finish the secuence here.", MessageType.Info); if (Event.current.type != EventType.layout) { if (node.Childs.Length != 0) { node.clearChilds(); } } }