using System; using System.Collections.Generic; using UnityEngine; public class GuildNoteNormalCell : MonoBehaviour { [SerializeField] TextEx time; [SerializeField] TextEx content; public void Display(int index, List datas) { if (datas.IsNullOrEmpty() || index < 0 || index >= datas.Count) return; DateTime currentTime = TimeUtility.GetTime(datas[index].Time); time.text = currentTime.ToString("HH:mm"); content.text = datas[index].Info; } public float GetHeight(string info) { float height = 0f; if (string.IsNullOrEmpty(info)) return height; content.text = info; height = content.preferredHeight; return height; } }