sourceWorld
Get the world this space is bound to, or a default (invalid) world if the space is not bound. A space is bound by creating it with the world overload of Create.
읽는 시간 1분최근 업데이트: 5일 전
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsWorld sourceWorld { get; }
Remarks
Destroying the world does not destroy the space, including when a scene load destroys the world. The space keeps its proxies, and this property then returns a world whose PhysicsWorld.isValid is false. Every method that needs the world, such as PhysicsSpace.SyncShapes, then throws InvalidOperationException. See PhysicsSpace.Create and PhysicsWorld.SceneLoadMode.