Documentation

Unity Engine


Unity Engine


AtRecord

(Obsolete) Request that the query's results be captured immediately, when the command is recorded.
Read time 1 minuteLast updated 3 days ago

Definition

  • Type: Field
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
Warning
Deprecated. The Capture-query-at-record feature will be removed in a future version of the Entities package. Use AtPlayback mode instead. If AtRecord semantics are required, use the query to generate a NativeArray of matching entities to process, and pass the array instead of the query. (RemovedAfter Entities 2.0)
AtRecord = 0

Remarks

The entire array of matching entities will be serialized into the command buffer, and this exact set of entities will be processed at playback time. This approach is far less efficient, but may lead to a more predictable set of entities being processed.
At playback time, the command throws an error if one of these entities is destroyed before playback. (With safety checks enabled, an exception is thrown. Without safety checks, playback will perform invalid and unsafe memory access.)