Version: 2019.1

LocalPhysicsMode

enumeration

Switch to Manual

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.

Variables

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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961