Question by
Silentblade328 · Jun 01, 2016 at 02:44 PM ·
c#scripting problemscene-switching
Problem with switching from a certain scene
My C# script to change scenes is very simple. In its entirety, it's:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class LocationSwitchScript : MonoBehaviour {
public void function(int nextLevel)
{
SceneManager.LoadScene(nextLevel);
}
}
However, when I am in a certain scene and try to move to another scene, it doesn't work. It is a problem with the scene itself, since if I call it from another scene assigned to the same index, it changes the scene to the one I want. Any idea what might be causing this?
Comment
Your answer
Follow this Question
Related Questions
How I can Open a Previous Scene with button back !? 3 Answers
I create material with script but it does not render right 0 Answers
C# Unity dot syntax exercise correct solution? 1 Answer
How do I fix my scrolling background,How do I fix my scrolling background? 0 Answers
Player rotation always resets. 0 Answers