This commit is contained in:
ThomasCharester committed 2026-02-26 11:21:27 +03:00
1 parent a73338916a
commit fbc1cc8d3e
207 files changed
+10327 -2

No files matched your search

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using Code.Infrastructure.SceneLoader;
using Cysharp.Threading.Tasks;
using Reflex.Core;
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace Code.Infrastructure.Configs
{
public partial class ConfigLocator : IConfigLocator
{
private Dictionary<Type, AssetReference> _singleConfigReferences = new();
private Dictionary<Type, string> _multipleConfigReferences = new();
public AssetReference TryGetConfigAssetReference<T>() => _singleConfigReferences.GetValueOrDefault(typeof(T), null);
public string TryGetManyConfigAssetReferences<T>() => _multipleConfigReferences.GetValueOrDefault(typeof(T), null);
partial void LoadConfigs();
public ConfigLocator()
{
LoadSystemConfigs();
LoadConfigs();
}
private void LoadSystemConfigs()
{
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
}
}
}