How can you make a looping room like in pt?

so i am a student learning game development and I’m creating a game with my friends for my schools game jam and I’m wondering how can you make looping rooms that change each time like P.T.

Instead of doing all of the above reply, you can also just teleport you’re player to the start of the entrance door (making it seems like its actually a new scene) when you walk down the basement which seems to be underground (yes I am myself a P.T. fan as well lol). and for the puzzles you could maybe keep all of the objects and details in the same scene just disabled or as a prefab which has left to be instantiated. I dont think creating a scene for each loop is good for performance so yeah.

Your question could be a lot more specific, but googling P.T. gave me some clue as to what it is. “Looping rooms” sounds endless to me, but they were just specific puzzles set in the same few rooms, with some details changing.

  1. Just make a different scene for every loop. But copy the objects from the last scene first, then delete/add some, and the loop-specific puzzle of course
  2. Make a base scene containing the environment, the walls, floor, view out of the window, and load another scene additively on top of it, depending on which loop you do. To get to the next loop, unload the additive scene and add a new one, while the base scene can remain loaded.
  3. Procedural generation, though this does not seem the case in P.T. A lot of code with GameObject.Instantiate(somePrefab), and a lot of figuring out where to validly place objects.

Hope this helped!