What was once a smooth loading screen, is now a frozen screen. From my main menu, it usually skips the loading screen and dives into the gameplay (which isn't too bad) but the real issue, is if you're in the help menu and chose 'Play' from there.

From the inspector under the slider, it shows:

Now, I have the loading Screen Manager and it's script set up, so I'm not sure why it's doing this. What I would like to do is to get it working again, whether I stick to sceneBuildIndex or go by sceneName but the problem here, when I try either one, it doesn't seem to have any real changes at all.

Here is a copy of the full script from a tutorial I followed when I was just starting out:

// LoadingScreenManager
// --------------------------------
// built by Martin Nerurkar (http://www.martin.nerurkar.de)
// for Nowhere Prophet (http://www.noprophet.com)
//

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.SceneManagement;

{

public Image progressBar;

public AudioListener audioListener;

AsyncOperation operation;
Scene currentScene;

public static int sceneToLoad = -1;

{
}

void Start()
{
return;

fadeOverlay.gameObject.SetActive(true); // Making sure it's on so that we can crossfade Alpha
currentScene = SceneManager.GetActiveScene();
}

{

yield return null;

StartOperation(levelNum);

float lastProgress = 0f;

// operation does not auto-activate scene, so it's stuck at 0.9
{
yield return null;

if (Mathf.Approximately(operation.progress, lastProgress) == false)
{
progressBar.fillAmount = operation.progress;
lastProgress = operation.progress;
}
}

audioListener.enabled = false;

ShowCompletionVisuals();

else
operation.allowSceneActivation = true;
}

private void StartOperation(int levelNum)
{

operation.allowSceneActivation = false;
}

{
}

{
}

{
}

{

progressBar.fillAmount = 0f;
}

void ShowCompletionVisuals()
{

progressBar.fillAmount = 1f;
}

}


I'm reading the manual here, but I'm not sure if I'm misunderstanding it, or if there's an error in the script:

• My first instinct says the problem is the method is static. Try removing the word “static” before “void LoadScene” – Ed Marty Nov 23 '19 at 2:23
• @EdMarty that looks to me like a good candidate for an answer. – DMGregory Nov 23 '19 at 3:06

There’s a lot going on in your question here, but if I’m understanding correctly, the problem you want solved is just that the On Value Changes event can’t find the LoadScene method on LoadingScreenManager.

If that’s the case, my guess is that the problem is that the method is static. Try changing

public static void LoadScene


To this

public void LoadScene


And see if it can find it now.