기술 자료

Unity Engine

Unity Engine

Clone()

Creates a new PhysicsWorld that is a copy of this world, including all of its PhysicsBody, PhysicsShape and PhysicsJoint.
읽는 시간 1분최근 업데이트: 21일 전

Definition

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

Returns

Type

Description

PhysicsWorldThe cloned world.

Remarks

The clone is a separate world, so handles you hold for this world do not resolve against it; enumerate the clone with PhysicsWorld.GetBodies and similar. The clone is not owned and its PhysicsWorld.userData is not copied; callback options come across but any callback targets must be set on the clone.