UI Update, volumes
This commit is contained in:
1 parent
e2d0974b3c
commit
0f0c8bab43
100 files changed
+10862
-734
No files matched your search
@@ -14,6 +14,7 @@ namespace Code.Infrastructure.UI
|
||||
{
|
||||
UniTaskVoid LoadPanel(UIPanelType panelType);
|
||||
void ReleasePanel(UIPanel panel);
|
||||
Canvas Canvas { get; }
|
||||
}
|
||||
|
||||
public class UIFactory : IDisposable, IUIFactory
|
||||
@@ -26,8 +27,11 @@ namespace Code.Infrastructure.UI
|
||||
private AsyncOperationHandle<IList<UIPanelSettingsConfig>> _configsHandle;
|
||||
private AsyncOperationHandle<CanvasSettingsConfig> _canvasSettingsHandle;
|
||||
private CanvasSettingsConfig _canvasConfig;
|
||||
|
||||
private GameObject _canvas;
|
||||
|
||||
public Canvas Canvas { get; private set; }
|
||||
|
||||
public UIFactory(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
@@ -63,6 +67,8 @@ namespace Code.Infrastructure.UI
|
||||
|
||||
_canvas = await Addressables.InstantiateAsync(_canvasConfig.Prefab).ToUniTask();
|
||||
UnityEngine.Object.DontDestroyOnLoad(_canvas);
|
||||
|
||||
Canvas = _canvas.GetComponent<Canvas>();
|
||||
|
||||
_eventBus.RaiseEvent<IUIInitializedHandle>(ui => ui.UIInitialized());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user