using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.AddressableAssets; namespace Code.Infrastructure.Configs { public partial class ConfigLocator : IConfigLocator { private Dictionary _singleConfigReferences = new(); private Dictionary _multipleConfigReferences = new(); public AssetReference TryGetConfigAssetReference() => _singleConfigReferences.GetValueOrDefault(typeof(T), null); public string TryGetManyConfigAssetReferences() => _multipleConfigReferences.GetValueOrDefault(typeof(T), null); partial void LoadConfigs(); public ConfigLocator() { LoadSystemConfigs(); LoadConfigs(); } private void LoadSystemConfigs() { Resources.Load("SystemConfigsReferences"); } } }