merge
merge and property
This commit is contained in:
21
Assets/Scripts/UVC/TopUI/SimulationNameText.cs
Normal file
21
Assets/Scripts/UVC/TopUI/SimulationNameText.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user