diff --git a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs index 2869f53f..a1f69be5 100644 --- a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs +++ b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs @@ -111,6 +111,12 @@ namespace Fungus } } + protected virtual Sequence CreateSequenceComponent(GameObject parent) + { + Sequence s = parent.AddComponent(); + return s; + } + /** * Create a new sequence node which you can then add commands to. */ @@ -119,7 +125,7 @@ namespace Fungus GameObject go = new GameObject("Sequence"); go.transform.parent = transform; go.transform.hideFlags = HideFlags.HideInHierarchy; - Sequence s = go.AddComponent(); + Sequence s = CreateSequenceComponent(go); s.nodeRect.x = position.x; s.nodeRect.y = position.y; return s;