Hello! I'd like to try and get my loading screen to work via the new wrapper but it seems I'm misinterpreting the syntax for the fields in the ORK editor.

Forgive my coding ignorance...

For the Class Name, I have LoadingScreenPro, which I think is correct. For the Load Scene Function and the Load Scene Async Function fields in the ORK editor do I need to input the entire function with loader scene name syntax, LoadSceneMode.Single and all?

I ask because the loader script is normally called through simply adding:

LoadingScenePro.Loadscene (string) anywhere the usual Unity SceneManager.LoadScene would appear.
  • You'll most likely need a wrapper script that is called by ORK and calls whatever functionality you need, e.g.:

    public static class SceneLoadWrapper
    public static void LoadScene(string sceneName, LoadSceneMode mode)
    SceneManager.LoadScene(sceneName, mode);

    public static void LoadSceneAsync(string sceneName, LoadSceneMode mode)
    SceneManager.LoadSceneAsync(sceneName, mode);

    This script just calls the standard Unity scene manager functions, but it's a good example.
    The class name would be SceneLoadWrapper and the function names are LoadScene and LoadSceneAsync
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks! This works!

    Well, kinda...

    I made a wrapper script that calls Loading Screen Pro and it works great, taking over all SceneManager stuff between any scene as expected.

    However, after moving on from my starting scene and trying to zone into another scene anywhere, the player didn't spawn. ORK spawned the UI and other elements but the player gameobject was nowhere within the scene.

    I thought possibly it was because the Loading Screen Pro asset actually jumps to a separate scene itself that contains all of the progress bar and background image.

    So, I tested that by setting the Loading Screen Pro scene (simply called Loader) to pause for input so I could check.

    Indeed, the player is getting spawned within the loading scene between changes and not the actual ORK scene specified in the Scene Changer.

    Any way around this?
  • The player is spawned by the scene changer when being notified by Unity that a new scene has been loaded. You could try to remove being notified before calling the custom loading and adding it again afterwards.

    So, you'd do something like this in your functions:
    SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded;
    // your custom load call code
    SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.