using UnityEngine; using UnityEditor; namespace RimWorldAnimationStudio { [CustomEditor(typeof(KeyframeSlider))] [CanEditMultipleObjects] public class MenuButtonEditor : UnityEditor.UI.SliderEditor { SerializedProperty ghostSlidersProp; SerializedProperty ghostSliderPrefabProp; SerializedProperty maxGhostsProp; protected override void OnEnable() { base.OnEnable(); ghostSlidersProp = serializedObject.FindProperty("ghostSliders"); ghostSliderPrefabProp = serializedObject.FindProperty("ghostSliderPrefab"); maxGhostsProp = serializedObject.FindProperty("maxGhosts"); } public override void OnInspectorGUI() { EditorGUILayout.PropertyField(ghostSlidersProp, new GUIContent("Ghost Sliders")); EditorGUILayout.PropertyField(ghostSliderPrefabProp, new GUIContent("Ghost Slider Prefab")); EditorGUILayout.PropertyField(maxGhostsProp, new GUIContent("Max Ghosts")); serializedObject.ApplyModifiedProperties(); base.OnInspectorGUI(); } } }