using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor.UI; using UnityEditor; [CustomEditor(typeof(CloneButtonTest), true)] public class CloneButtonEditor : ToggleEditor { SerializedProperty m_CloneType; protected override void OnEnable() { base.OnEnable(); m_CloneType = serializedObject.FindProperty("cloneObjType"); } public override void OnInspectorGUI() { EditorGUILayout.Space(); serializedObject.Update(); EditorGUILayout.PropertyField(m_CloneType); EditorGUILayout.Space(); serializedObject.ApplyModifiedProperties(); base.OnInspectorGUI(); } }