Class ManagedState Extends IDisposable, ICloneable

Public

Runtime state for agent movement that requires managed types.

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

This class is used to store those things.

It is created at runtime and does not store any settings that need to be persistent.

This is not a component. Each agent reaches its instance through an AgentManagedRef component, which indexes AgentManagedStorage.

Public Methods

Dispose ()

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

Public Static Methods

SetPath (path, state, movementPlane, destination)

Make the AI follow the specified path.

Public Variables

activePath

Path that is being followed, if any.

Public
pathTracer

Calculates in which direction to move to follow the path.

Public
pendingPath

Path that is being calculated, if any.

Public

Private/Protected Members

Clone ()

Clones the managed state for when an entity is duplicated.