Example #1
0
        public override void OnInspectorGUI()
        {
            UtilityEditor.PropertyField("Normal", Normal);
            UtilityEditor.PropertyField("Choose", Choose);

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Normal"))
            {
                ToggleButtonComponent.SetToggleEditor(false);
            }
            if (GUILayout.Button("Choose"))
            {
                ToggleButtonComponent.SetToggleEditor(true);
            }
            GUILayout.EndHorizontal();

            //base.OnInspectorGUI();
            if (!ToggleButtonComponent.bInit)
            {
                ToggleButtonComponent.bInit = true;
                SetDefaultValue(ToggleButtonComponent);
            }

            if (GUI.changed)
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
Example #2
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     UtilityEditor.PropertyField("KEY", key);
     if (GUI.changed)
     {
         serializedObject.ApplyModifiedProperties();
     }
     if (!RawImageComponent.bInit)
     {
         RawImageComponent.bInit = true;
         SetDefaultValue(RawImageComponent);
     }
 }