Opening “Dead Scene” when player is dead. And there is again button in “Dead Scene”. If player click it, i want to open scene again.
I have an idea but it is useless.
If you know best or easiest way to do this. Can you tell me?
Thank you.
Opening “Dead Scene” when player is dead. And there is again button in “Dead Scene”. If player click it, i want to open scene again.
I have an idea but it is useless.
If you know best or easiest way to do this. Can you tell me?
Thank you.
Make a variable that keeps track of the scene, update the variable when switching scenes.
public static string PreviousScene = "";
public void LoadScene(string sceneName)
{
PreviousScene = SceneManager.GetActiveScene().name;
SceneManager.LoadScene(sceneName);
}
Thank you this is what i need to know exactly.
– hpluviaNo, the transform values in the editor stay the same.
– mrboembastic