#nullable enable using UnityEngine; using UVC.UI.List.Accordion; namespace UVC.UI.Window { /// /// 아코디언 리스트()를 포함하는 간단한 컨테이너 윈도우. /// 외부에서 전달된 데이터로 내부 리스트를 구성합니다. /// public class AccordionWindow : MonoBehaviour { [SerializeField] private AccordionList list = default!; [Tooltip("드래그 시 그리드 아이템 이미지가 커서를 따라다니도록 설정합니다.")] [SerializeField] private bool dragImageFollowCursor = true; /// /// 내부 에 대한 접근자. /// 이벤트 구독 등 외부에서 리스트에 직접 접근할 때 사용합니다. /// public AccordionList AccordionList => list; private void Awake() { if (list == null) { Debug.LogWarning("AccordionWindow: list is not assigned."); } else { list.dragImageFollowCursor = dragImageFollowCursor; } } /// /// 내부 에 데이터를 설정합니다. /// /// 아코디언 루트 데이터. public void SetData(AccordionData data) { list!.SetData(data); } } }