Help with Checkpoint (C#)

So, i’m trying to make a not-that-simple checkpoint system.

I have already done something, but I want to make just one script for it.

The thing is:

void OnTriggerEnter (Colider col) 
{
    if (col.gameObject.tag == "Checkpoint") 
      {
        //Save the scene as another called "Checkpoint"
      }
}

void Update () 
{
  if (Input.GetKeyDown (KeyCode.R)) 
   {
     //SceneMaganer.LoadScene ("Checkpoint");
   }
}

Or something like that…

//Sorry for my English :slight_smile:

If you trigger the Checkpoint then a new Scene will be created and that scene must be equal to the actual scene. That one will be called “Checkpoint”. If you press R (or whatever key designated for the checkpoint activation) the checkpoint scene must be loaded.

The problem I have is: I don’t know how to create a new Scene that’s almost the same as the actual but with the data of the actual.

Otherwise, I’ve tried to create a text file with all the variables (with positions and stuff) and then when pressing the designated key for the checkpoint activation replace the actual variable values with the ones on the text file.

Hope you undertand.