public override void OnInspectorGUI() { base.OnInspectorGUI(); serializedObject.Update(); UGUIExButtonToggleGroup _Group = serializedObject.targetObject as UGUIExButtonToggleGroup; _Group.GroupResize(); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); EditorGUILayout.Space(); serializedObject.Update(); UGUIExButtonToggle _Button = serializedObject.targetObject as UGUIExButtonToggle; EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_IsOnProperty); _Button.ReSize(); if (EditorGUI.EndChangeCheck()) { EditorSceneManager.MarkSceneDirty(_Button.gameObject.scene); UGUIExButtonToggleGroup group = m_GroupProperty.objectReferenceValue as UGUIExButtonToggleGroup; _Button.IsOn = m_IsOnProperty.boolValue; if (group != null && _Button.IsActive()) { if (_Button.IsOn || (!group.AnyTogglesOn() && !group.AllowSwitchOff)) { _Button.IsOn = true; group.NotifyToggleOn(_Button); } } } EditorGUILayout.PropertyField(m_TransitionProperty); EditorGUILayout.PropertyField(m_GraphicProperty); EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_GroupProperty); if (EditorGUI.EndChangeCheck()) { EditorSceneManager.MarkSceneDirty(_Button.gameObject.scene); UGUIExButtonToggleGroup group = m_GroupProperty.objectReferenceValue as UGUIExButtonToggleGroup; _Button.Group = group; } EditorGUILayout.Space(); // Draw the event notification options EditorGUILayout.PropertyField(m_OnClickProperty); serializedObject.ApplyModifiedProperties(); }