Platform should be initialized in the Boot, before everything else. Got rid of the coroutines
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Nox.Input;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
@@ -14,9 +15,9 @@ namespace Nox.Platform {
|
||||
}
|
||||
|
||||
public PlatformSettings PlatformSettings => desktopPlatformSettings;
|
||||
public IEnumerator Initialize(object applicationData) {
|
||||
public async Task Initialize(object applicationData) {
|
||||
var handle = Addressables.LoadAssetAsync<DesktopPlatformSettings>(assetReference);
|
||||
yield return new WaitUntil(() => handle.IsDone);
|
||||
await handle.Task;
|
||||
desktopPlatformSettings = handle.Result;
|
||||
Debug.Log($"Device Platform {desktopPlatformSettings.devicePlatform} initialized");
|
||||
InitializeInput();
|
||||
|
||||
Reference in New Issue
Block a user