Forum rules - please read before posting.

GetLoadingProgress always 0

edited November 2022 in Technical Q&A

Hi all,
I'm trying to make a loading bar, at the moment my starting screen is loaded through script. But the loading bar is always at the bottom despite it loading. I did an Update() Debug.Log for it and it says it's always 0.

I've tried this:
UnityEngine.SceneManagement.SceneManager.LoadSceneAsync("town");

and this:
AC.SceneInfo nextSceneInfo = new AC.SceneInfo("town");
AC.KickStarter.sceneChanger.ChangeScene(nextSceneInfo, true);

But the Debug.Log always shows 0. The scene loads fine.

In Update() I have this
AC.KickStarter.sceneChanger.GetLoadingProgress();
Debug.Log(AC.KickStarter.sceneChanger.GetLoadingProgress());

The menu Slider has the loading LoadingProgress on it, and I make the menu appear manually.

What can I do to fix this?
Thank you :)

Comments

  • Do you have Load scenes asynchronously? checked in your Settings Manager?

    If you use Unity's own LoadSceneAsync, then you won't be able to read AC's GetLoadingProgress. You can, however, read AsyncOperation.progress - which is essentially the same thing. Unity's docs on this can be found here.

    AsyncOperation.progress can be "quirky" at times, for lack of a better word. Where is the GameObject that holds your script?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.