using System.Collections; using System.Collections.Generic; using SO; using SO.Channels; using TMPro; using UnityEngine; public class TextUIUpdate : MonoBehaviour { [SerializeField] private TextMeshProUGUI text; [SerializeField] private StepChangeChannelSO stepChangeChannel; private void OnEnable() { stepChangeChannel.OnStepChanged += OnStepChanged; } private void OnDisable() { stepChangeChannel.OnStepChanged -= OnStepChanged; } private void OnStepChanged(StepSO step) { text.text = step.Description; } }