using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEditor.UI; using UnityEngine; namespace SC.XR.Unity { [CustomEditor(typeof(SCSlider2D), true)] [CanEditMultipleObjects] public class SCSlider2DEditor : SliderEditor { SerializedProperty m_OnPointerDown; SerializedProperty m_OnPointerUp; SerializedProperty m_OnDrag; protected override void OnEnable() { base.OnEnable(); m_OnPointerDown = serializedObject.FindProperty("m_OnPointerDown"); m_OnPointerUp = serializedObject.FindProperty("m_OnPointerUp"); m_OnDrag = serializedObject.FindProperty("m_OnDrag"); } public override void OnInspectorGUI() { base.OnInspectorGUI(); serializedObject.Update(); EditorGUILayout.PropertyField(m_OnPointerDown); EditorGUILayout.PropertyField(m_OnPointerUp); EditorGUILayout.PropertyField(m_OnDrag); serializedObject.ApplyModifiedProperties(); } } }