You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
703 B
33 lines
703 B
4 years ago
|
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();
|
||
|
}
|
||
|
}
|