Hello, trying to get some information with regards to integrating a progress loading screen using wrapper class. Please what exactly are we suppose to do in the wrapper script/class? Are we suppose to query ork game state(whether a scene is loading)? am not really a coder, am just trying to get some information i can give to someone that will assist me
  • I've been trying to work with this myself.

    My last thread here has some clues: http://forum.orkframework.com/discussion/4545/unity-wrapper#latest

    I'm personally trying to get this working myself with an asset called Loading Screen Pro.

    I made a wrapper based on Gil's input that got the loader to work using the below settings/code...
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;




    public static class LoadWrapper {

    public static void LoadScene(string sceneName, LoadSceneMode mode)
    {
    LoadingScreenPro.LoadScene(sceneName);

    }

    public static void LoadSceneAsync(string sceneName, LoadSceneMode mode)
    {
    LoadingScreenPro.LoadScene(sceneName);

    }
    }
    image

    However, ORK instantiates the player in the loading screen scene instead of the actual ORK scene that follows it. So, it's not working yet. I contacted the creator of the asset and he gave me some tips that didn't work. He also made another version of his script especially for ORK and it still doesn't work.

    So, not sure at this point where to go with this.
  • @FancyFerretStudios have you tried Gil latest suggestion? if yes what was the outcome?
  • Yes, tried that but still no luck.

    The dev from Loading Screen Pro sent me a script based on Gil's last suggestion but it had an error. His next revised version didn't get attached to his email, so hoping he sends me something later that might work.
  • @FancyFerretStudio please let me know if it starts working. Am interested
  • @FancyFerretStudio what is the situation of things? has there been any progress?
  • I never received a new script from the Loading Screen dev and I hate to keep bugging him. I tried all sorts of variations myself but haven't been able to get this to work properly.

    Changing the location of the SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded; and SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;does seem to partially work, halting the spawning of the player inside any loading scene, but it still doesn't spawn in the actual ORK game scene.



  • Hmmm, am also having a lot of hard time trying to integrate poolboss with ork. Am even contemplating uploading the game without pooling. I was speaking to the same guy you contacted about integrating loading scene pro with ork, but he is not giving me any feedback. I contacted another developer, and he seems optimistic about it. Can you send me the code(the wrapper script you guys have done so) let me see if we can make it work with the new guys asset.
  • The wrapper I made is above in the yellow code quotes. It calls Loading Screen but it's just the player instantiation I can't seem to fix.

    From what I've seen, pretty much all of the other loading screen solutions use this dedicated loading scene approach if they're anything beyond a progress bar using the UI canvas.

    What's the other dev's asset you contacted?
  • I'll do some tests once I find the time for this :)
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • @FancyFerretStudios the asset is loading screen. He is also the author of ugui minimap(already integrated with ork). Here is the link https://assetstore.unity.com/packages/tools/gui/loading-screen-59069
  • @FancyFerretStudios from what i saw in your code, you didn't do unsubscribe and subscribe Gil recommended. Below is what i think Gil is trying to say

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;




    public static class LoadWrapper {

    public static void LoadScene(string sceneName, LoadSceneMode mode)
    {
    SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded;

    LoadingScreenPro.LoadScene(sceneName);

    SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;

    }

    public static void LoadSceneAsync(string sceneName, LoadSceneMode mode)
    {
    SceneManager.sceneLoaded -= ORK.Core.OnSceneLoaded;

    LoadingScreenPro.LoadScene(sceneName);

    SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;

    }
    }

    I think were the problem could be, is how to get the target scene name and pass it to LoadingScreenPro.LoadScene() as parameter. @gamingislove is there any ork method we can use to get the target scene name(with return type string)?
  • Actually that's exactly one of the last iterations I tried and it didn't work either.

    Changing the location did seem to partially halt the player spawning inside the loader as I said but still didn't spawn the player in the proper scene.
  • @FancyFerretStudios I think we need to use a method to find the actual target scene and pass it as a parameter to the LoadingScreenPro.LoadScene(sceneName); method
  • @gamingislove is there any way we can query ork to get our target scene?
  • Well, ORK calls the wrapper functions with the target scene name.
    I guess registering to the scene loaded functionality is made too soon, so you could try delaying it using this function:

    private static IEnumerator DelayRegister()
    {
    yield return null;
    SceneManager.sceneLoaded += ORK.Core.OnSceneLoaded;
    }


    Call the function in the LoadScene and LoadSceneAsync functions instead of registering:

    ORK.StartCoroutine(DelayRegister());
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.