I'll still do some tests once I find the time for this - it might be a solution for now, but could also lead to the scene changer missing the actual scene load and not spawn the player.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I was ready to throw in the towel and just commission a plugin but noticed I had a duplicated line.
Thanks to @gamingislove for that coroutine.
This seems to work with Loading Screen Pro asset:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using ORKFramework;
public static class LoadWrapper {
private static IEnumerator DelayRegister()
{
yield return null;
SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;
}
public static void LoadScene(string sceneName, LoadSceneMode mode)
{
SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded;
LoadingScreenPro.LoadScene(sceneName);
ORK.StartCoroutine(DelayRegister());
}
public static void LoadSceneAsync(string sceneName, LoadSceneMode mode)
{
SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded;
LoadingScreenPro.LoadScene(sceneName);
ORK.StartCoroutine(DelayRegister());
}
}
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!