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