Browse Source

Specialised Editors correctly call base OnEnable

master
desktop-maesty/steve 7 years ago
parent
commit
985eae4199
  1. 5
      Assets/Fungus/Scripts/Editor/CallEditor.cs
  2. 3
      Assets/Fungus/Scripts/Editor/CommandEditor.cs
  3. 5
      Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs
  4. 5
      Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs
  5. 5
      Assets/Fungus/Scripts/Editor/LabelEditor.cs
  6. 5
      Assets/Fungus/Scripts/Editor/MenuEditor.cs
  7. 5
      Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs
  8. 5
      Assets/Fungus/Scripts/Editor/PortraitEditor.cs
  9. 5
      Assets/Fungus/Scripts/Editor/SayEditor.cs
  10. 5
      Assets/Fungus/Scripts/Editor/SetVariableEditor.cs
  11. 5
      Assets/Fungus/Scripts/Editor/StageEditor.cs
  12. 5
      Assets/Fungus/Scripts/Editor/VariableConditionEditor.cs
  13. 4
      Assets/Fungus/Scripts/Editor/VariableEditor.cs
  14. 5
      Assets/Fungus/Scripts/Editor/WriteEditor.cs

5
Assets/Fungus/Scripts/Editor/CallEditor.cs

@ -15,10 +15,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty startIndexProp;
protected SerializedProperty callModeProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
targetFlowchartProp = serializedObject.FindProperty("targetFlowchart");
targetBlockProp = serializedObject.FindProperty("targetBlock");

3
Assets/Fungus/Scripts/Editor/CommandEditor.cs

@ -40,6 +40,9 @@ namespace Fungus.EditorUtils
public virtual void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
reorderableLists = new Dictionary<string, ReorderableList>();
}

5
Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs

@ -17,10 +17,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty fadeDurationProp;
protected SerializedProperty waitUntilFinishedProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
controlProp = serializedObject.FindProperty("control");
audioSourceProp = serializedObject.FindProperty("_audioSource");

5
Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs

@ -21,10 +21,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty stringParameterProp;
protected SerializedProperty stringEventProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
descriptionProp = serializedObject.FindProperty("description");
delayProp = serializedObject.FindProperty("delay");

5
Assets/Fungus/Scripts/Editor/LabelEditor.cs

@ -51,10 +51,9 @@ namespace Fungus.EditorUtils
property.objectReferenceValue = labelObjects[selectedIndex];
}
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
keyProp = serializedObject.FindProperty("key");
}

5
Assets/Fungus/Scripts/Editor/MenuEditor.cs

@ -17,10 +17,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty setMenuDialogProp;
protected SerializedProperty hideThisOptionProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
textProp = serializedObject.FindProperty("text");
descriptionProp = serializedObject.FindProperty("description");

5
Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs

@ -12,10 +12,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty durationProp;
protected SerializedProperty targetBlockProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
durationProp = serializedObject.FindProperty("_duration");
targetBlockProp = serializedObject.FindProperty("targetBlock");

5
Assets/Fungus/Scripts/Editor/PortraitEditor.cs

@ -26,10 +26,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty moveProp;
protected SerializedProperty shiftIntoPlaceProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
stageProp = serializedObject.FindProperty("stage");
displayProp = serializedObject.FindProperty("display");

5
Assets/Fungus/Scripts/Editor/SayEditor.cs

@ -83,10 +83,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty setSayDialogProp;
protected SerializedProperty waitForVOProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
characterProp = serializedObject.FindProperty("character");
portraitProp = serializedObject.FindProperty("portrait");

5
Assets/Fungus/Scripts/Editor/SetVariableEditor.cs

@ -30,10 +30,9 @@ namespace Fungus.EditorUtils
protected List<SerializedProperty> variableDataProps;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
variableProp = serializedObject.FindProperty("variable");
setOperatorProp = serializedObject.FindProperty("setOperator");

5
Assets/Fungus/Scripts/Editor/StageEditor.cs

@ -16,10 +16,9 @@ namespace Fungus.EditorUtils
protected SerializedProperty fadeDurationProp;
protected SerializedProperty waitUntilFinishedProp;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
displayProp = serializedObject.FindProperty("display");
stageProp = serializedObject.FindProperty("stage");

5
Assets/Fungus/Scripts/Editor/VariableConditionEditor.cs

@ -15,10 +15,9 @@ namespace Fungus.EditorUtils
protected Dictionary<System.Type, SerializedProperty> propByVariableType;
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
variableProp = serializedObject.FindProperty("variable");
compareOperatorProp = serializedObject.FindProperty("compareOperator");

4
Assets/Fungus/Scripts/Editor/VariableEditor.cs

@ -12,8 +12,10 @@ namespace Fungus.EditorUtils
[CustomEditor (typeof(Variable), true)]
public class VariableEditor : CommandEditor
{
protected virtual void OnEnable()
public override void OnEnable()
{
base.OnEnable();
Variable t = target as Variable;
t.hideFlags = HideFlags.HideInInspector;
}

5
Assets/Fungus/Scripts/Editor/WriteEditor.cs

@ -30,10 +30,9 @@ namespace Fungus.EditorUtils
EditorGUILayout.SelectableLabel(tagsText, GUI.skin.GetStyle("HelpBox"), GUILayout.MinHeight(pixelHeight));
}
protected virtual void OnEnable()
public override void OnEnable()
{
if (NullTargetCheck()) // Check for an orphaned editor instance
return;
base.OnEnable();
textObjectProp = serializedObject.FindProperty("textObject");
textProp = serializedObject.FindProperty("text");

Loading…
Cancel
Save