- Home /
Question by
ajsnarr98 · Nov 27, 2015 at 10:22 AM ·
c#scripting problemloadlevel
Cannot Get Application.LoadLevel to work
For some reason Application.LoadLevel is not working for me. It does not give an error message, or anything else, it just gets skipped over. I added some Debug.Log statements for testing, and for some reason the error gets logged, and the "this should not show" gets logged, but the MainScreen level never loads. I tried Application.LoadLevel(0) but that does not work either.
Here is the part of my code where it is.
if (!error.Equals("none")) //if there is error
{
Debug.LogError(error);
PlayerPrefs.SetInt("isError", 1);
Application.LoadLevel("MainScreen");
Debug.Log("this should not show");
}
else
{
Debug.Log("No error");
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How would I make a ListChangedEvent? 1 Answer
How to get referenced object from TransparentProxy? 0 Answers
Building Placement Script Places Item When Switching Buildings. 0 Answers