stringoptionText=EditorGUILayout.TextField(newGUIContent("Option Text","Text to display on the option button."),
t.optionText);
EditorGUILayout.PropertyField(optionTextProp,newGUIContent("Option Text","Text to display on the option button."));
SequencetargetSequence=SequenceEditor.SequenceField(newGUIContent("Target Sequence","Sequence to execute when this option is selected by the player."),
SequenceEditor.SequenceField(targetSequenceProp,
newGUIContent("Target Sequence","Sequence to execute when this option is selected by the player."),
newGUIContent("<Continue>"),
t.GetFungusScript(),
t.targetSequence);
t.GetFungusScript());
boolhideOnSelected=EditorGUILayout.Toggle(newGUIContent("Hide On Selected","Hide this option forever once the player has selected it."),t.hideOnSelected);
EditorGUILayout.PropertyField(hideOnSelectedProp,newGUIContent("Hide On Selected","Hide this option forever once the player has selected it."));
floatstepTime=EditorGUILayout.FloatField(newGUIContent("Step Time","Minimum time to execute each step"),t.stepTime);
EditorGUILayout.PropertyField(stepTimeProp,newGUIContent("Step Time","Minimum time to execute each step"));
SequencestartSequence=SequenceEditor.SequenceField(newGUIContent("Start Sequence","Sequence to be executed when controller starts."),
SequenceEditor.SequenceField(startSequenceProp,
newGUIContent("Start Sequence","Sequence to be executed when controller starts."),
newGUIContent("<None>"),
t,
t.startSequence);
t);
if(t.startSequence==null)
{
GUIStylestyle=newGUIStyle(GUI.skin.label);
@ -51,18 +64,9 @@ namespace Fungus.Script
EditorGUILayout.LabelField(newGUIContent("Error: Please select a Start Sequence"),style);
}
boolstartAutomatically=EditorGUILayout.Toggle(newGUIContent("Start Automatically","Start this Fungus Script when the scene starts."),t.startAutomatically);
EditorGUILayout.PropertyField(startAutomaticallyProp,newGUIContent("Start Automatically","Start this Fungus Script when the scene starts."));
boolcolorCommands=EditorGUILayout.Toggle(newGUIContent("Color Commands","Display commands using colors in editor window."),t.colorCommands);
if(EditorGUI.EndChangeCheck())
{
Undo.RecordObject(t,"Set Fungus Script");
t.stepTime=stepTime;
t.startSequence=startSequence;
t.startAutomatically=startAutomatically;
t.colorCommands=colorCommands;
}
EditorGUILayout.PropertyField(colorCommandsProp,newGUIContent("Color Commands","Display commands using colors in editor window."));