private void OnEnable() { button = serializedObject.targetObject as KGUI_Button; 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); onGroupReset = serializedObject.FindProperty("onGroupReset"); buttonGroup = serializedObject.FindProperty("buttonGroup"); }
public void RemoveButton(KGUI_Button button) { if (!Interactions.Contains(button)) { return; } Interactions.Remove(button); }
public void SetButton(KGUI_Button button) { if (Interactions == null) { return; } if (Interactions.Contains(button)) { button.OnClick(0); } }
public void AddButton(KGUI_Button button) { OnInitialize(); if (Interactions.Contains(button)) { return; } if (!button.IsButtonGroup) { return; } if (button.buttonGroup == null) { button.buttonGroup = this; } Interactions.Add(button); }