Ejemplo n.º 1
0
        protected override void OnNodeInspectorGUI()
        {
            selectionMode = (SelectionMode)UnityEditor.EditorGUILayout.EnumPopup("Selection Mode", selectionMode);
            if (selectionMode == SelectionMode.IndexBased)
            {
                index = (BBInt)EditorUtils.BBVariableField("Index", index);
            }
            else
            {
                enumIndex = (BBEnum)EditorUtils.BBVariableField("Enum", enumIndex);
            }

            outOfRangeMode = (OutOfRangeMode)UnityEditor.EditorGUILayout.EnumPopup("When Out Of Range", outOfRangeMode);
        }
Ejemplo n.º 2
0
 protected override void OnNodeInspectorGUI()
 {
     selectionMode = (CaseSelectionMode)UnityEditor.EditorGUILayout.EnumPopup("Selection Mode", selectionMode);
     if (selectionMode == CaseSelectionMode.IndexBased)
     {
         intCase        = (BBParameter <int>)EditorUtils.BBParameterField("Int", intCase);
         outOfRangeMode = (OutOfRangeMode)UnityEditor.EditorGUILayout.EnumPopup("When Out Of Range", outOfRangeMode);
     }
     else
     {
         enumCase = (BBObjectParameter)EditorUtils.BBParameterField("Enum", enumCase, true);
         if (enumCase.value != null)
         {
             GUILayout.BeginVertical("box");
             foreach (var s in System.Enum.GetNames(enumCase.value.GetType()))
             {
                 GUILayout.Label(s);
             }
             GUILayout.EndVertical();
         }
     }
 }
Ejemplo n.º 3
0
 protected override void OnNodeInspectorGUI()
 {
     selectionMode = (CaseSelectionMode)UnityEditor.EditorGUILayout.EnumPopup("Selection Mode", selectionMode);
     if (selectionMode == CaseSelectionMode.IndexBased)
     {
         intCase = (BBParameter<int>)EditorUtils.BBParameterField("Int", intCase);
         outOfRangeMode = (OutOfRangeMode)UnityEditor.EditorGUILayout.EnumPopup("When Out Of Range", outOfRangeMode);
     }
     else
     {
         enumCase = (BBObjectParameter)EditorUtils.BBParameterField("Enum", enumCase, true);
         if (enumCase.value != null){
             GUILayout.BeginVertical("box");
             foreach (var s in System.Enum.GetNames(enumCase.value.GetType()) )
                 GUILayout.Label(s);
             GUILayout.EndVertical();
         }
     }
 }