private void OnEnable()
        {
            button = serializedObject.targetObject as KGUI_ButtonCustom;

            //onClick = serializedObject.FindProperty("onClick");
            //onEnter = serializedObject.FindProperty("onEnter");
            //onExit = serializedObject.FindProperty("onExit");
            //onDown = serializedObject.FindProperty("onDown");
            //onUp = serializedObject.FindProperty("onUp");

            //onDownStay = serializedObject.FindProperty("onDownStay");

            //buttonType = serializedObject.FindProperty("buttonType");

            //spriteRenderer = serializedObject.FindProperty("spriteRenderer");
            //image = serializedObject.FindProperty("image");

            //normalSprite = serializedObject.FindProperty("normalSprite");
            //enterSprite = serializedObject.FindProperty("enterSprite");
            //pressedSprite = serializedObject.FindProperty("pressedSprite");
            //disableSprite = serializedObject.FindProperty("disableSprite");

            //normalObject = serializedObject.FindProperty("normalObject");
            //enterObject = serializedObject.FindProperty("enterObject");
            //pressedObject = serializedObject.FindProperty("pressedObject");
            //disableObject = serializedObject.FindProperty("disableObject");

            if (ButtonType == null)
            {
                ButtonType = new KGUIButtonTypeEditor();
            }
            if (ButtonEvent == null)
            {
                ButtonEvent = new KGUIButtonEventEditor();
            }

            ButtonType.OnInstantiation(serializedObject);
            ButtonEvent.OnInstantiation(serializedObject);

            AudioClip = serializedObject.FindProperty("audioClip");
        }
Example #2
0
        private void OnEnable()
        {
            button = serializedObject.targetObject as KGUI_ButtonCustom;

            if (ButtonType == null)
            {
                ButtonType = new KGUIButtonTypeEditor();
            }
            if (ButtonEvent == null)
            {
                ButtonEvent = new KGUIButtonEventEditor();
            }

            if (ButtonAudio == null)
            {
                ButtonAudio = new KGUIButtonAudioEditor();
            }

            ButtonType.OnInstantiation(serializedObject);
            ButtonEvent.OnInstantiation(serializedObject);
            ButtonAudio.OnInstantiation(serializedObject);
        }