@ -615,6 +615,8 @@ namespace Fungus
{
if (command == selectedCommand)
command.OnCommandRemoved(sequence);
Undo.RecordObject(fungusScript.selectedSequence, "Delete");
fungusScript.selectedSequence.commandList.RemoveAt(i);
Undo.DestroyObjectImmediate(command);
@ -117,6 +117,12 @@ namespace Fungus
public virtual void OnCommandAdded(Sequence parentSequence)
{}
/**
* Called when the command is deleted from a sequence in the editor.
*/
public virtual void OnCommandRemoved(Sequence parentSequence)
public virtual void OnEnter()