|
using UnityEditor;
|
|
using UnityEditor.UI;
|
|
using UnityEngine;
|
|
|
|
[CustomEditor(typeof(ButtonExtend), true)]
|
|
[CanEditMultipleObjects]
|
|
public class MyEmptyRaycastExtenEditor : ButtonEditor
|
|
{
|
|
private SerializedProperty scale_enabled;
|
|
private SerializedProperty scale_target;
|
|
private SerializedProperty press_scale;
|
|
private SerializedProperty normal_scale;
|
|
|
|
protected override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
scale_enabled = serializedObject.FindProperty("scale_enabled");
|
|
scale_target = serializedObject.FindProperty("scale_target");
|
|
press_scale = serializedObject.FindProperty("press_scale");
|
|
normal_scale = serializedObject.FindProperty("normal_scale");
|
|
}
|
|
public override void OnInspectorGUI()
|
|
{
|
|
base.OnInspectorGUI();
|
|
EditorGUILayout.Space();
|
|
serializedObject.Update();
|
|
EditorGUILayout.PropertyField(scale_enabled, new GUIContent("scale_enabled"));
|
|
EditorGUILayout.PropertyField(scale_target, new GUIContent("scale_target"));
|
|
EditorGUILayout.PropertyField(press_scale, new GUIContent("press_scale"));
|
|
EditorGUILayout.PropertyField(normal_scale, new GUIContent("normal_scale"));
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
}
|
|
|
|
|