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(); } void Update() { PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID); if (keyframe != null) { text.text = keyframe.soundEffect == null || keyframe.soundEffect == "" ? "None" : keyframe.soundEffect; } else { text.text = "None"; } } } }