using System.Text; using TMPro; using UnityEngine; namespace AibisDream { public class RecordPanel : MonoBehaviour, IUIPanel { public bool IsOpen => gameObject.activeSelf; public readonly StringBuilder recordStr = new(); public void Show() { ShowText(); gameObject.SetActive(true); } public void Hide() { gameObject.SetActive(false); // 关闭时停止渲染 ClearText(); } private void ShowText() { var text = transform.Find("Log View").GetComponentInChildren(); text.text = recordStr.ToString(); } private void ClearText() { var text = transform.Find("Log View").GetComponentInChildren(); text.text = null; } } }