Class ManagedState Extends IComponentData, IDisposable, ICloneable

Public

Settings for agent movement that cannot be put anywhere else.

The Unity ECS in general wants everything in components to be unmanaged types. However, some things cannot be unmanaged types, for example delegates and interfaces. There are also other things like path references and node references which are not unmanaged types at the moment.

This component is used to store those things.

It can also be used for things that are not used often, and so are best kept out-of-band to avoid bloating the ECS chunks too much.

Public Methods

CancelCurrentPathRequest ()
Public
ClearPath ()
Public
Dispose ()
Public
PopNextLinkFromPath ()

Pops the current part, and the next part from the start of the path.

Public

Public Static Methods

SetPath (path, state, movementPlane, destination)

Make the AI follow the specified path.

Public Static

Public Variables

activePath

Path that is being followed, if any.

Public
enableGravity

True if gravity is enabled for this agent.

Public
enableLocalAvoidance

True if local avoidance is enabled for this agent.

Public
onTraverseOffMeshLink

Callback for when the agent starts to traverse an off-mesh link.

pathTracer

Calculates in which direction to move to follow the path.

Public
pathfindingSettings
Public
pendingPath

Path that is being calculated, if any.

Public
rvoSettings

Local avoidance settings.

Public

Private/Protected Members

Clone ()

Clones the managed state for when an entity is duplicated.

Private

Deprecated Members

autoRepath

Settings for when to recalculate the path.

Public