Reload the recently closed scene

Since i just a begginer here… Somebody can help me with this??.
I have a quiz scene and i want to go to the trophy room scene to check my progress and go back again to the recently close scene which is the quiz…
i also have Lots of scene.

Hello there,

If you only want to get back to the scene you just left, you could save the current scene index to the Player Prefs every time you load a scene.

Then, when you want to get back to the previous scene, load the number from the Player Prefs and use it to load the scene.

It action, it would probably look like this:

using UnityEngine.SceneManagement;

public class MySceneManagement : MonoBehaviour
{
    // Load scene at the provided index - current scene index gets saved
    public static void LoadSceneByIndex(int sceneIndex)
    {
        PlayerPrefs.SetInt("PreviousSceneIndex", SceneManager.GetActiveScene().buildIndex);
        SceneManager.LoadScene(sceneIndex);
    }

    // Go back one scene using saved index
    public static void LoadPreviousScene()
    {
        if (!PlayerPrefs.HasKey("PreviousSceneIndex"))
            Debug.LogError("There is no previous scene!");
        else
            SceneManager.LoadScene(PlayerPrefs.GetInt("PreviousSceneIndex"));
    }
}

You can then call those from pretty much anywhere using:

        // Call from anywhere to load scene at provided index
        MySceneManagement.LoadSceneByIndex(2);

        // Call from anywhere to go back one scene.
        MySceneManagement.LoadPreviousScene();

I hope that helps!

~LegendBacon