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.
41 lines
1.0 KiB
41 lines
1.0 KiB
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
using UnityEditor; |
|
|
|
[CustomEditor (typeof(Motion))] |
|
public class MotionEditor : Editor |
|
{ |
|
public override void OnInspectorGUI() |
|
{ |
|
DrawDefaultInspector(); |
|
|
|
Motion script = target as Motion; |
|
|
|
GUILayout.Space(20); |
|
int max = System.Enum.GetValues(typeof(Motion.Type)).Length; |
|
for (int i = 0; i < max; i++) |
|
{ |
|
if (GUILayout.Button($"{(Motion.Type)i} Play ")) |
|
{ |
|
script.Play((Motion.Type)i, true); |
|
} |
|
} |
|
|
|
//GUILayout.Space(20); |
|
//if (GUILayout.Button($"스킨")) |
|
//{ |
|
// script.SpriteAttach(); |
|
//} |
|
|
|
//GUILayout.Space(20); |
|
//max = System.Enum.GetValues(typeof(Motion.Emoji)).Length; |
|
//for (int i = 0; i < max; i++) |
|
//{ |
|
// if (GUILayout.Button($"{(Motion.Emoji)i} Play ")) |
|
// { |
|
// script.Play_Emoji((Motion.Emoji)i); |
|
// } |
|
//} |
|
} |
|
}
|
|
|