2022-09-21 05:40:58 +00:00
|
|
|
|
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();
|
2022-09-21 05:40:58 +00:00
|
|
|
|
|
|
|
|
|
if (clip != null)
|
2022-10-27 05:56:04 +00:00
|
|
|
|
{ text.text = clip.Layer; }
|
2022-09-21 05:40:58 +00:00
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{ text.text = "Pawn"; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|