LoadLevel causes phisics to "break"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ZeroElementGames
Posts: 13
Joined: Tue May 25, 2021 7:18 pm

LoadLevel causes phisics to "break"

Post by ZeroElementGames »

Hi, we're using LoadLevel to change scene en teleport the player to a new scene. But after doing so, in the new scene when the player jumps... its like no physics apply. No errors pop , just goes wrong. Any idea what could be doing this? I suspect something breaks on the rigidbody , but not sure what to do. Thanks !
User avatar
Tony Li
Posts: 22032
Joined: Thu Jul 18, 2013 1:27 pm

Re: LoadLevel causes phisics to "break"

Post by Tony Li »

Hi,

The LoadLevel() sequencer command calls PixelCrushers.SaveSystem.LoadScene().

PixelCrushers.SaveSystem.LoadScene() does these things:

1. Saves the outgoing scene's data to memory. (Saver components.)
2. Calls UnityEngine.SceneManagement.SceneManager.LoadScene(). Waits for it to finish.
3. Applies in-memory save data to Savers in the newly-loaded scene.

It doesn't do anything with physics.

Note: GameObjects that were marked Don't Destroy On Load in the previous scene, such as the Save System's GameObject and the Dialogue Manager GameObject, will survive scene changes. The Dialogue Manager and Save System that come from the previous scene will replace the ones that are present in the newly-loaded scene.

Check your Console window for any errors or warnings.

Then check the components on your player GameObject -- for example, make sure its rigidbody component is still enabled.

Finally, select Edit > Project Settings. In the Time section, check the current timeScale.
Post Reply