Essentials + extra crap
Loadings Startups Movement Camera
This commit is contained in:
1 parent
662f4a1d05
commit
5f5ace1b52
734 files changed
+107323
-1713
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42496064fd5d42fea1c889f91e6a7e98
|
||||
timeCreated: 1765711330
|
||||
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Configs
|
||||
{
|
||||
[CreateAssetMenu(fileName = "SystemConfigsReferences", menuName = "Configs/SystemConfigsReferences")]
|
||||
public partial class SystemConfigsReferences : ScriptableObject
|
||||
{
|
||||
public AssetReference scenesAssetReferences;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 728b0ad306a64bd28d47fc4d052c5e81
|
||||
timeCreated: 1766325607
|
||||
Reference in new issue
Block a user