diff --git a/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs b/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs index 8171ae89..8c32c3dd 100755 --- a/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs @@ -225,9 +225,6 @@ namespace Fungus { Sequence sequence = sequences[i]; - // Hack to support legacy design where sequences were child gameobjects (will be removed soon) - sequence.UpdateSequenceName(); - float nodeWidth = nodeStyle.CalcSize(new GUIContent(sequence.sequenceName)).x + 10; sequence.nodeRect.width = Mathf.Max(120, nodeWidth); sequence.nodeRect.height = 30; diff --git a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs index ca78c532..06332c82 100644 --- a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs +++ b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs @@ -152,10 +152,9 @@ namespace Fungus */ public virtual bool ExecuteSequence(Sequence sequence) { - // Sequence must be a child of the parent Fungus Script + // Sequence must be a component of the Fungus Script game object if (sequence == null || - sequence.transform.parent != transform && - sequence.transform != transform) + sequence.gameObject != gameObject) { return false; } diff --git a/Assets/Fungus/FungusScript/Scripts/Sequence.cs b/Assets/Fungus/FungusScript/Scripts/Sequence.cs index 2d07ea85..324684f0 100644 --- a/Assets/Fungus/FungusScript/Scripts/Sequence.cs +++ b/Assets/Fungus/FungusScript/Scripts/Sequence.cs @@ -159,16 +159,5 @@ namespace Fungus } return connectedSequences; } - - // Force set the sequence name for any legacy child sequences. - // This is a temporary hack to make it easier to upgrade from earlier versions and will be removed soon. - public virtual void UpdateSequenceName() - { - if (sequenceName == "New Sequence" && - GetComponent() == null) - { - sequenceName = gameObject.name; - } - } } }