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

OnGraphsPostUpdate ()

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

Public
OnGraphsPostUpdateBeforeAreaRecalculation ()

Called after graphs have been updated.

Public
OnGraphsPreUpdate ()

Called before graphs are updated using GraphUpdateObjects.

Public
OnLatePostScan ()

Called at the end of the scanning procedure.

Public
OnPostCacheLoad ()

Called after cached graphs have been loaded.

Public
OnPostGraphLoad ()

Called after a graph has been deserialized and loaded.

Public
OnPostScan ()

Called right after all graphs have been scanned.

Public
OnPreScan ()

Called right before graphs are going to be scanned.

Public

Public Static Methods

FindAllModifiers ()
Public Static
TriggerEvent (type)

Triggers an event for all active graph modifiers.

Public Static

Public Enums

EventType

GraphModifier event type.

Public

Private/Protected Members

AddToLinkedList ()
Private
Awake ()
Protected
ConfigureUniqueID ()
Private
GetModifiersOfType< T > ()
Protected Static
OnDestroy ()
Protected
OnDisable ()

Removes this modifier from list of active modifiers.

Protected
OnEnable ()

Adds this modifier to list of active modifiers.

Protected
OnUpgradeSerializedData (version, unityThread)

Handle serialization backwards compatibility.

Protected
RemoveFromLinkedList ()
Private
Reset ()

Handle serialization backwards compatibility.

Protected
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