22 lines
652 B
C#
22 lines
652 B
C#
|
|
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 = "<color=#FF0000>악몽</color>의 숲";
|
||
|
|
|
||
|
|
[TextArea(2, 5)]
|
||
|
|
public string description = "추천 레벨 : <color=#FFFF00>10 ~ 15</color>";
|
||
|
|
|
||
|
|
private void OnValidate()
|
||
|
|
{
|
||
|
|
if (nameText != null) nameText.text = areaName;
|
||
|
|
if (descText != null) descText.text = description;
|
||
|
|
}
|
||
|
|
}
|