Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

how to reload a unity scene faster?

Hello everyone,

I am currently working on a puzzle platformer project in unity using C#. There game has no lives system, so when the player makes a mistake, the level is restarted immediately.

I normally use the following code to (re)load a scene:

string scene = "name";
SceneManager.LoadScene(scene);

However, this method has a loading time, ranging between a few and tens of seconds. I am wondering if there is a way to make the reloading of the same scene almost instant, for example: the game 'Ori and the blind forest' features multiple escape sessions. When the player dies during these, the restarting takes no more than a second, which helps to maintain 'the flow of the game'.

How do I go about this most efficiently?

Best Answer

  • Accepted Answer

    You can use LoadSceneAsync to have multiple scenes load at the same time. But if only have one scene per level you may also want to use a restart function that would reset the players position, the time, etc.

Sign In or Register to comment.