rimworld-animation-studio/Assets/Scripts/GUI/SelectActorLayerButton.cs

31 lines
646 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace RimWorldAnimationStudio
{
public class SelectActorLayerButton : MonoBehaviour
{
private Text text;
public void Start()
{
text = GetComponentInChildren<Text>();
}
void Update()
{
if (Workspace.animationDef == null) return;
2022-10-27 05:56:04 +00:00
PawnAnimationClip clip = Workspace.GetCurrentPawnAnimationClip();
if (clip != null)
2022-10-27 05:56:04 +00:00
{ text.text = clip.Layer; }
else
{ text.text = "Pawn"; }
}
}
}