Version: 2020.2
LanguageEnglish
  • C#

LocalPhysicsMode

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Provides options for 2D and 3D local physics.

By default, when a Scene is created or loaded, any 2D or 3D physics component added to a GameObject within the Scene is added to the default physics Scene. Each Scene however has the ability to create and own its own (local) 2D and/or 3D physics Scene. This option can be used when creating or loading a Scene to specify whether a 2D and/or 3D physics Scene should be created.

When a Scene creates its own 2D and/or 3D physics Scene, the lifetime of the physics Scene(s) is the same as the Scene i.e. if the Scene is destroyed/unloaded then so are any created physics Scenes.

See Also: CreateSceneParameters, LoadSceneParameters, SceneManager.CreateScene, SceneManager.LoadScene and SceneManager.LoadSceneAsync.

Properties

NoneNo local 2D or 3D physics Scene will be created.
Physics2DA local 2D physics Scene will be created and owned by the Scene.
Physics3DA local 3D physics Scene will be created and owned by the Scene.