|
|
|
@ -6,9 +6,12 @@ using Fungus;
|
|
|
|
|
using Rotorz.ReorderableList; |
|
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
|
|
[CustomPropertyDrawer (typeof(Variable))] |
|
|
|
|
public class VariableDrawer : PropertyDrawer |
|
|
|
|
namespace Fungus.Script |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
[CustomPropertyDrawer (typeof(Variable))] |
|
|
|
|
public class VariableDrawer : PropertyDrawer |
|
|
|
|
{ |
|
|
|
|
public override void OnGUI (Rect position, SerializedProperty property, GUIContent label) |
|
|
|
|
{ |
|
|
|
|
SerializedProperty keyProp = property.FindPropertyRelative("key"); |
|
|
|
@ -37,11 +40,11 @@ public class VariableDrawer : PropertyDrawer
|
|
|
|
|
typeProp.enumValueIndex = selectedEnum; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[CustomEditor (typeof(FungusScript))] |
|
|
|
|
public class FungusScriptEditor : Editor |
|
|
|
|
{ |
|
|
|
|
[CustomEditor (typeof(FungusScript))] |
|
|
|
|
public class FungusScriptEditor : Editor |
|
|
|
|
{ |
|
|
|
|
SerializedProperty variablesProperty; |
|
|
|
|
|
|
|
|
|
void OnEnable() |
|
|
|
@ -95,4 +98,6 @@ public class FungusScriptEditor : Editor
|
|
|
|
|
|
|
|
|
|
serializedObject.ApplyModifiedProperties(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |