Struct JobManagedOffMeshLinkTransition Extends IJobChunk

Public

Advances the off-mesh link traversal of every agent that is currently traversing one.

Run through JobChunkInterface.RunByRefWithoutJobs, which iterates chunks on the calling thread without entering the job system. Link traversal runs the user's coroutine and state machine, which 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, which is why the components a finished traversal drops go through commandBuffer. The guard is compiled out of release players, along with the rest of ENABLE_UNITY_COLLECTIONS_CHECKS.

The caller completes all dependencies first, so reading chunk memory here is safe.

Public Methods

Execute (chunk, unfilteredChunkIndex, useEnabledMask, chunkEnabledMask)

Called once per chunk by RunByRefWithoutJobs.

Run (state, query, commandBuffer, deltaTime)

Advances every matched agent's link traversal by one step.

Public Static Methods

GetEntityQuery (state)

The query this must be run over.

MoveNext (entity, state, transform, movementPlane, movementControl, movementSettings, linkInfo, managedLinkInfo, movementDisabled, localAvoidanceDisabled, deltaTime)

Public Variables

commandBuffer
Public
deltaTime
Public
entityHandle
Public
linkTraversalHandle
Public
localAvoidanceDisabledHandle
Public
localTransformHandle
Public
managedRefHandle
Public
movementControlHandle
Public
movementDisabledHandle
Public
movementPlaneHandle
Public
movementSettingsHandle
Public