using UnityEngine;

namespace InterfaceOff
{
    [CreateAssetMenu(fileName = nameof(PrefabRegistry), menuName = "Custom/Create Prefab Registry")]
    public class PrefabRegistry : ScriptableObject
    {
        [field: SerializeField] public GameObject ImagePrefab { get; private set; }
        [field: SerializeField] public GameObject TextButtonPrefab { get; private set; }
        
        public static PrefabRegistry Instance { get; private set; }

        [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
        private static void LoadRegistry() => Instance = Resources.Load<PrefabRegistry>(nameof(PrefabRegistry));
    }
}