Class GraphModifier Extends VersionedMonoBehaviour

Public

GraphModifier is used for modifying graphs or processing graph data based on events.

This class is a simple container for a number of events.

Warning

Some events will be called both in play mode and in editor mode (at least the scan events). So make sure your code handles both cases well. You may choose to ignore editor events.

See

Application.IsPlaying

Warning

Events may be received before Awake and OnEnable has been called on the component. This is because graphs are typically scanned during Awake on the AstarPath component, which may happen before Awake on the graph modifier itself.

Public Methods

Called after graphs have been updated using GraphUpdateObjects or navmesh cutting.

Called after graphs have been updated.

Called before graphs are updated using GraphUpdateObjects.

Called at the end of the scanning procedure.

Called after cached graphs have been loaded.

Called after a graph has been deserialized and loaded.

Called right after all graphs have been scanned.

Called right before graphs are going to be scanned.

Public Static Methods

TriggerEvent (type)

Triggers an event for all active graph modifiers.

Public Enums

EventType

GraphModifier event type.

Public

Private/Protected Members

Awake ()

Removes this modifier from list of active modifiers.

Adds this modifier to list of active modifiers.

OnUpgradeSerializedData (migrations, unityThread)

Handle serialization backwards compatibility.

Reset ()

Handle serialization backwards compatibility.

UpgradeSerializedData (isUnityThread)
next
Private
prev
Private
root

All active graph modifiers.

Private Static
uniqueID

Unique persistent ID for this component, used for serialization.

Protected
usedIDs

Maps persistent IDs to the component that uses it.

Protected Static