Struct MovementOverrideRunner Extends IJobChunk

Public

Invokes the user's movement override callbacks.

Run through JobChunkInterface.RunByRefWithoutJobs, which iterates chunks on the calling thread without entering the job system. Movement override callbacks are documented to run on the main thread, and routinely touch Transforms, GameObjects and UnityEngine.Random, which Unity refuses inside a job context. IJobEntity over unmanaged components would schedule a real job, so it cannot be used here.

That entry point also installs Unity's guard against structural changes during iteration, so a callback which adds or removes a component gets an exception naming the problem. The guard is compiled out of release players, along with the rest of ENABLE_UNITY_COLLECTIONS_CHECKS.

The callers complete all dependencies first, so reading chunk memory here is safe.

Public Methods

Execute (chunk, unfilteredChunkIndex, useEnabledMask, chunkEnabledMask)

Invokes every registered callback for phase on the agents matched by query.

Run (state, query, phase, dt)

Invokes every registered callback for phase on the agents matched by query.

Update (state)

Public Static Methods

InvalidateMovementState (movementState)

Tells the repair job that the movement state may no longer match the path tracer.

Public Variables

destinationHandle
Public
dt
Public
entityHandle
Public
localTransformHandle
Public
managedRefHandle
Public
movementControlHandle
Public
movementPlaneHandle
Public
movementSettingsHandle
Public
movementStateHandle
Public
phase
Public
resolvedMovementHandle
Public
shapeHandle
Public

Public Enums

Phase

Which point in the movement pipeline to invoke callbacks for.

Public