mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-23 15:48:33 -05:00
28 lines
593 B
C#
28 lines
593 B
C#
|
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;
|
||
|
}
|
||
|
}
|