diff --git a/Assets/Fungus/FungusScript/Editor/FungusScriptMenuItems.cs b/Assets/Fungus/FungusScript/Editor/FungusScriptMenuItems.cs index 01c4ce8d..38fcf085 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusScriptMenuItems.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusScriptMenuItems.cs @@ -17,6 +17,9 @@ namespace Fungus Sequence sequence = Undo.AddComponent(newFungusScriptGO); sequence.nodeRect.x += 60; sequence.nodeRect.y += 60; + GameStarted gameStarted = Undo.AddComponent(newFungusScriptGO); + gameStarted.parentSequence = sequence; + sequence.eventHandler = gameStarted; fungusScript.selectedSequence = sequence; fungusScript.scrollPos = Vector2.zero; Undo.RegisterCreatedObjectUndo(newFungusScriptGO, "Create Fungus Script");