기술 자료

Unity Engine

Unity Engine

CreateSnapshot(Allocator)

Capture the current simulation state of this world into a PhysicsWorld.Snapshot.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsWorld.Snapshot CreateSnapshot(Allocator allocator = Allocator.Persistent)

Parameters

allocator

The allocator for the snapshot memory. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent.

Returns

Type

Description

SnapshotA snapshot of the world that must be disposed of after use. The snapshot is not created if the world or allocator is invalid.