- Home /
How to switch instantly between scenes? (Or better implementation)
My current implementation thought for the game I'm working on would be to switch scenes, but I'm not sure if that's fast enough or the right way to do this. The mechanic is to press a key and instantly switch between "time periods" but the player would still be in the same location. I want to be able to do it even mid-jump so that I could jump in the air, switch to the other time period, and land back on the ground following the same motion.
Answer by I_Am_Err00r · Jul 26, 2019 at 06:53 PM
I've done something similar with a 2D sidescrolling game so that when I entered a door, the exterior wall would be disabled and interior objects (including colliders so I had platforms) would be enabled.
Basically, you have to bake two scenes and have everything stored in two different parent objects (PresentTime, FutureTime) and store the differences between the two within those empty game objects
You will still need to customize and tweak things yourself (like maybe adding an animation to the transition similar to Link to the Past), but that should at least get you started.