Exemplo n.º 1
0
            protected void DeleteAllStates()
            {
                LBInternalState    default_state = LBInternalState.Default;
                SerializedProperty states;
                SerializedProperty input_output_states;

                states = serializedObject.FindProperty("states");
                states.ClearArray();
                states.arraySize++;
                default_state.SetSerializedProperty(states.GetArrayElementAtIndex(0));

                input_output_states = serializedObject.FindProperty("input_state_switch");
                input_output_states.ClearArray();
                input_output_states = serializedObject.FindProperty("output_state_switch");
                input_output_states.ClearArray();
            }
Exemplo n.º 2
0
            protected void AddNewState(string name)
            {
                SerializedProperty states;
                LBInternalState    state;

                if (name == "")
                {
                    return;
                }

                state  = new LBInternalState(name);
                states = serializedObject.FindProperty("states");

                states.arraySize++;
                state.SetSerializedProperty(states.GetArrayElementAtIndex(states.arraySize - 1));
            }