Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AsWorld(PhysicsWorld)

Get a copy of this handle that refers to the specified PhysicsWorld. The index and generation are preserved and only the world is changed, so the result refers to the same object slot in the specified world. This is useful when one world shares an identical handle layout with another, such as a world created from a snapshot of, or a clone of, the original.
Read time 1 minuteLast updated 14 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsHandle AsWorld(PhysicsWorld world)

Parameters

The world the returned handle should refer to.

Returns

Type

Description

PhysicsHandleA handle referring to the same slot and generation in the specified world.