22 lines
440 B
C#
22 lines
440 B
C#
using Simulator.Data;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class SimulationNameText : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
TMP_Text text;
|
|
|
|
private void Start()
|
|
{
|
|
ComponentsManager.Instance.onProjectNameRecieved += UpdateText;
|
|
}
|
|
|
|
void UpdateText(string data)
|
|
{
|
|
text.text = data;
|
|
LayoutRebuilder.ForceRebuildLayoutImmediate(this.GetComponent<RectTransform>());
|
|
}
|
|
}
|