Back system.


I would like to request a script that allows a user on a different scene to click a gui button and go back to the scene he was on. This can’t be like application.loadlevel because that RELOADS the scene. Take Minecraft for an example. You’re on controls, press back, and it goes to the scene AS IT WAS LEFT. I was wondering. What would the script be for that in javascript? Thanks!

P.s. To the moderator that see’s this, please do not reject my question. I swear that this was honestly my last choice. I’ve searched the Internet, I’ve tried over 7 techniques, and this was my last choice. Please accept it.

Are you keeping your menu system and your game level on different scenes? That’s probably your problem, just switch the camera from the GUI to the main camera and back again when you access the menu. You keep the GUI and the game on separate layers so they don’t overlap.

But if you’re talking about saving and reloading levels, that’s done by saving information about the scene when you leave it so it can be rebuilt the same way when the level loads.

So like:
Could I do:

var PauseCam = gameObject.Find("Camera");
var MainCam = gameObject.Find("MainCamera");

function Update () {
        PauseCam.enabled = true;
        MainCam.enabled = true;