#nullable enable
using System.Collections.Generic;
using UnityEngine;
using UVC.UI.List;
namespace UVC.UI.Window
{
public class LibraryWindow : MonoBehaviour
{
[SerializeField]
private PrefabGrid prefabGrid = default!;
///
/// 내부 에 대한 접근자.
/// 이벤트 구독 등 외부에서 그리드에 직접 접근할 때 사용합니다.
///
public PrefabGrid PrefabGrid => prefabGrid;
protected void Awake()
{
if (prefabGrid == null)
{
prefabGrid = GetComponentInChildren();
}
if (prefabGrid == null)
{
Debug.LogError("PrefabGrid component is not assigned or found in Children.");
return;
}
}
public void SetData(List list)
{
if (prefabGrid != null)
{
prefabGrid.SetupData(list);
}
}
///
/// 닫기
///
public void Close()
{
gameObject.SetActive(false);
}
}
}