public override void OnInspectorGUI() { base.OnInspectorGUI(); tk2dUIHoverItem hoverBtn = (tk2dUIHoverItem)target; hoverBtn.overStateGO = tk2dUICustomEditorGUILayout.SceneObjectField("Over State GameObject", hoverBtn.overStateGO, target); hoverBtn.outStateGO = tk2dUICustomEditorGUILayout.SceneObjectField("Out State GameObject", hoverBtn.outStateGO, target); BeginMessageGUI(); methodBindingUtil.MethodBinding("On Toggle Hover", typeof(tk2dUIHoverItem), hoverBtn.SendMessageTarget, ref hoverBtn.SendMessageOnToggleHoverMethodName); EndMessageGUI(); if (GUI.changed) { tk2dUtil.SetDirty(hoverBtn); } }
void Awake() { if (upButton != null) { hoverUpButton = upButton.GetComponent <tk2dUIHoverItem>(); } if (downButton != null) { hoverDownButton = downButton.GetComponent <tk2dUIHoverItem>(); } }
private void Awake() { if (this.upButton != null) { this.hoverUpButton = this.upButton.GetComponent<tk2dUIHoverItem>(); } if (this.downButton != null) { this.hoverDownButton = this.downButton.GetComponent<tk2dUIHoverItem>(); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); tk2dUIHoverItem hoverBtn = (tk2dUIHoverItem)target; hoverBtn.overStateGO = tk2dUICustomEditorGUILayout.SceneObjectField("Over State GameObject", hoverBtn.overStateGO, target); hoverBtn.outStateGO = tk2dUICustomEditorGUILayout.SceneObjectField("Out State GameObject", hoverBtn.outStateGO, target); if (GUI.changed) { EditorUtility.SetDirty(hoverBtn); } }
void Awake() { if (upButton != null) { hoverUpButton = upButton.GetComponent<tk2dUIHoverItem>(); } if (downButton != null) { hoverDownButton = downButton.GetComponent<tk2dUIHoverItem>(); } }