Inactive in console even though its active in the inspector.
Here is my code it's really close together so that the forum doesn't split up the code:
using System.Collections; using UnityEngine; using UnityEngine.SceneManagement;
public class LoadScene : MonoBehaviour {
public void LoadLevel (int sceneIndex)
{
StartCoroutine(LoadAsynchronously(sceneIndex)); //error is on this line when i doubble click on the console error
}
IEnumerator LoadAsynchronously (int sceneIndex)
{
AsyncOperation operation = SceneManager.LoadSceneAsync(sceneIndex);
while (operation.isDone == false)
{
Debug.Log(operation.progress);
yield return null;
}
}
}
It works fine on my tempory loading scene just to see if it worked (off a youtube vid from brackets) but then it worked so I decided to use it on my main menu and make it load the scenes faster. this was not the case as it decided to throw errors at me.
it is active in the inspector. the scenes that it is supposed to be loading have been tested and working in the other loading scene. I can see it in the inspector while in the game and not.
Believe me, everything is correct in the inspector it is just the code and I have tried to do the setActive stuff plenty of times but that won't do anything because It's ALREADY ACTIVE UGH.
clearly, a novice here help is appreciated.
Your answer
