ドキュメント

Unity Engine

Unity Engine

CreateSnapshot(Allocator)

Capture the current simulation state of this world into a PhysicsWorld.Snapshot.
読み終わるまでの所要時間 1 分最終更新 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.