Currently when my Player jumps into a portal (trigger) a new scene loads.
This next scene contains only a camera and falling-through-space vfx.
Problem is the transition causes a 5 second delay while switching scenes.
I’ve been googling/testing all day, but so far nothing is stopping the freeze.
What is the easiest way to preload the next scene to make this seamless?
The game doesn’t even need to preserve anything from the old scene.
You need to use asynchronous scene loading. Also, even with async scene loading, it’s possible you have a lot of things happening in Start methods of your scene objects. Those can cause a hiccup when the scene first loads too.
Have you tried using SceneManager.LoadSceneAsync and then on .completed calling SceneManager.UnloadSceneAsync on your previous scene?
Easiest stuff:
- put a trigger collider way before the portal, when the player hits the collider start to load the Scene async and activate it when the player hits the portal
- freeze and hide the player while you’re loading the next scene (additionally you might want to develop a “load screen” while you’re loading also async the next scene)
not 100% sure how to do it, but there’s a way to have multiple scenes loaded at once. You could just have your transition scene already loaded. You just need to write some code to activate the contents in that scene (the camera, the falling character, etc).
If the transition scene is that simple you could just keep it DontDestroyOnLoad and SetActive whatever for transition visibility - you’d use a bit more memory but avoid the loading/unloading.