Open bilalakil opened 1 year ago
public async UniTaskVoid LoadSceneAsync(string nextScene, Action onLoaded = null)
{
if (SceneManager.GetActiveScene().name == nextScene)
{
onLoaded?.Invoke();
return;
}
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(nextScene);
asyncOperation.completed += _ => onLoaded?.Invoke();
await UniTask.WaitUntil(() => asyncOperation.isDone);
}
I have the same problem.
The problem was that I called the scene change in Awake, changed it to Start. I realized this after reading the Extenject documentation
Describe the bug I'm getting this warning message in the console for no significant reason: "Failed to remove SceneContext from SceneContextRegistry"
To Reproduce Add this static class to a project to unload a scene in case when the projected is started from the wrong scene:
Expected behavior No warnings in the console.
Extenject and Unity info (please complete the following information):