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

31 lines
655 B
C#

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;
PawnAnimationClip clip = Workspace.Instance.GetCurrentPawnAnimationClip();
if (clip != null)
{ text.text = clip.layer; }
else
{ text.text = "Pawn"; }
}
}
}