using NEG.UI.UnityUi.Buttons; using UnityEditor; using UnityEditor.UI; namespace NEG.UI.UnityUi.Editor { [CustomEditor(typeof(CustomNavigationButton), true)] public class CustomNavigationButtonEditor : ButtonEditor { private SerializedProperty downOverrideProperty; private SerializedProperty leftOverrideProperty; private SerializedProperty rightOverrideProperty; private SerializedProperty upOverrideProperty; protected override void OnEnable() { base.OnEnable(); upOverrideProperty = serializedObject.FindProperty("upOverride"); downOverrideProperty = serializedObject.FindProperty("downOverride"); leftOverrideProperty = serializedObject.FindProperty("leftOverride"); rightOverrideProperty = serializedObject.FindProperty("rightOverride"); } public override void OnInspectorGUI() { base.OnInspectorGUI(); EditorGUILayout.Space(); serializedObject.Update(); EditorGUILayout.PropertyField(upOverrideProperty); EditorGUILayout.PropertyField(downOverrideProperty); EditorGUILayout.PropertyField(leftOverrideProperty); EditorGUILayout.PropertyField(rightOverrideProperty); serializedObject.ApplyModifiedProperties(); } } }