Browse Source

Set new / pasted command as selected command

master
chrisgregan 11 years ago
parent
commit
01444de479
  1. 3
      Assets/Fungus/FungusScript/Editor/SequenceEditor.cs
  2. BIN
      Assets/Shuttle/ShuttleGame.unity

3
Assets/Fungus/FungusScript/Editor/SequenceEditor.cs

@ -138,13 +138,14 @@ namespace Fungus.Script
FungusCommand newCommand = Undo.AddComponent(fungusScript.selectedSequence.gameObject, selectedType) as FungusCommand;
Undo.RecordObject(fungusScript, "Add Command");
fungusScript.selectedSequence.commandList.Add(newCommand);
fungusScript.selectedCommand = newCommand;
}
if (fungusScript.copyCommand != null)
{
if (GUILayout.Button("Paste"))
{
FungusCommandEditor.PasteCommand(fungusScript.copyCommand, fungusScript.selectedSequence);
fungusScript.selectedCommand = FungusCommandEditor.PasteCommand(fungusScript.copyCommand, fungusScript.selectedSequence);
}
}

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save