29 lines
669 B
C#
29 lines
669 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
public class AddSoundDefButton : MonoBehaviour
|
|
{
|
|
private Text text;
|
|
|
|
public void Start()
|
|
{
|
|
text = GetComponentInChildren<Text>();
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
PawnKeyframe keyframe = Workspace.GetCurrentOrPreviousKeyframe(Workspace.ActorID);
|
|
|
|
if (keyframe != null)
|
|
{ text.text = string.IsNullOrEmpty(keyframe.SoundEffect) ? "None" : keyframe.SoundEffect; }
|
|
|
|
else
|
|
{ text.text = "None"; }
|
|
}
|
|
}
|
|
}
|