• edited January 2018
    Ok, I think this works @henkesky1

    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());

    }
    }


    Post edited by FancyFerretStudios on
  • edited January 2018
    @FancyFerretStudios congratulation. I will add it to my project. Thanks to @gamingislove
    Post edited by henkesky1 on
  • 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.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.