Add notes handling to TaskButtonManager for UDP commands
This commit is contained in:
23
Unity/Assets/Scripts/NotesDisplay.cs
Normal file
23
Unity/Assets/Scripts/NotesDisplay.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class NotesDisplay : MonoBehaviour
|
||||
{
|
||||
[Header("Notes UI")]
|
||||
[Tooltip("TextMeshProUGUI field where received notes will be displayed")]
|
||||
public TextMeshProUGUI notesText;
|
||||
|
||||
public void SetNotes(string text)
|
||||
{
|
||||
if (notesText != null)
|
||||
{
|
||||
notesText.text = text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("NotesDisplay: notesText is not assigned in the inspector.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user