Tanoda
SimpleAnimationPlayerEditor.cs
Go to the documentation of this file.
2using UnityEditor;
3using UnityEngine;
4
5namespace TriLibCore.Editor
6{
7 [CustomEditor(typeof(SimpleAnimationPlayer))]
9 {
10 public override void OnInspectorGUI()
11 {
12 base.OnInspectorGUI();
13 var simpleAnimationPlayer = (SimpleAnimationPlayer) target;
14 if (simpleAnimationPlayer.AnimationClips != null)
15 {
16 for (var i = 0; i < simpleAnimationPlayer.AnimationClips.Count; i++)
17 {
18 var animationClip = simpleAnimationPlayer.AnimationClips[i];
19 if (animationClip != null && GUILayout.Button(animationClip.name))
20 {
21 simpleAnimationPlayer.PlayAnimation(i);
22 }
23 }
24 }
25 }
26 }
27}
Represents a Playable used to play Animations from its Animation Clip List using names or indices as ...