Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocalPhysicsMode

Provides options for 2D and 3D local physics.
Read time 1 minuteLast updated 8 days ago

Definition

[Flags]public enum LocalPhysicsMode

Remarks

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.

Fields

Value

Description

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.