using UnityEngine; using TMPro; public class AreaInfo : MonoBehaviour { [Header("연결할 UI 요소들")] public TextMeshProUGUI nameText; public TextMeshProUGUI descText; [Header("내용 설정 (Rich Text 사용 가능)")] [TextArea(2, 5)] // 인스펙터 입력창을 넓게 만들어줍니다. public string areaName = "악몽의 숲"; [TextArea(2, 5)] public string description = "추천 레벨 : 10 ~ 15"; private void OnValidate() { if (nameText != null) nameText.text = areaName; if (descText != null) descText.text = description; } }