ドキュメント

Unity Engine

Download Unity

Unity Engine

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.