Browse Source

Can now make prefabs from legacy FungusScripts

If you have a FungusScript from an earlier beta release that has child
Sequence objects, you can now make a prefab from that FungusScript.
master
chrisgregan 11 years ago
parent
commit
42f0e6a8fc
  1. 5
      Assets/Fungus/FungusScript/Scripts/Sequence.cs

5
Assets/Fungus/FungusScript/Scripts/Sequence.cs

@ -27,7 +27,10 @@ namespace Fungus
if (fungusScript == null)
{
// Legacy support for earlier system where Sequences were children of the FungusScript
fungusScript = GetComponentInParent<FungusScript>();
if (transform.parent != null)
{
fungusScript = transform.parent.GetComponent<FungusScript>();
}
}
return fungusScript;

Loading…
Cancel
Save