Files
Virtual-Tutor/Unity/Assets/Scripts/NotesDisplay.cs

24 lines
483 B
C#

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.");
}
}
}