A* Pathfinding Project
4.3.8
The A* Pathfinding Project for Unity 3D
|
Connects two nodes with a direct connection. More...
Connects two nodes with a direct connection.
It is not possible to detect this link when following a path (which may be good or bad), for that you can use NodeLink2.
Public Member Functions | |
virtual void | Apply () |
Connects the start and end points using a link or refreshes the existing link. More... | |
void | OnDrawGizmos () |
override void | OnGraphsPostUpdateBeforeAreaRecalculation () |
Called after graphs have been updated. More... | |
Public Member Functions inherited from GraphModifier | |
virtual void | OnGraphsPostUpdate () |
Called after graphs have been updated using GraphUpdateObjects or navmesh cutting. More... | |
virtual void | OnGraphsPreUpdate () |
Called before graphs are updated using GraphUpdateObjects. More... | |
virtual void | OnLatePostScan () |
Called at the end of the scanning procedure. More... | |
virtual void | OnPostCacheLoad () |
Called after cached graphs have been loaded. More... | |
virtual void | OnPostGraphLoad () |
Called after a graph has been deserialized and loaded. More... | |
virtual void | OnPostScan () |
Called right after all graphs have been scanned. More... | |
virtual void | OnPreScan () |
Called right before graphs are going to be scanned. More... | |
Public Attributes | |
float | costFactor = 1.0f |
The connection will be this times harder/slower to traverse. More... | |
bool | deleteConnection = false |
Delete existing connection instead of adding one. More... | |
Transform | end |
End position of the link. More... | |
bool | oneWay = false |
Make a one-way connection. More... | |
Properties | |
Transform | End [get] |
Transform | Start [get] |
Properties inherited from VersionedMonoBehaviour | |
int Util.IEntityIndex. | EntityIndex [get, set] |
Internal entity index used by #BurstBatchHelper. More... | |
Properties inherited from IEntityIndex | |
int | EntityIndex [get, set] |
Additional Inherited Members | |
Public Types inherited from GraphModifier | |
enum | EventType { PostScan = 1 << 0, PreScan = 1 << 1, LatePostScan = 1 << 2, PreUpdate = 1 << 3, PostUpdate = 1 << 4, PostCacheLoad = 1 << 5, PostUpdateBeforeAreaRecalculation = 1 << 6, PostGraphLoad = 1 << 7 } |
GraphModifier event type. More... | |
Static Public Member Functions inherited from GraphModifier | |
static void | FindAllModifiers () |
static void | TriggerEvent (GraphModifier.EventType type) |
Triggers an event for all active graph modifiers. More... | |
Protected Member Functions inherited from GraphModifier | |
override void | Awake () |
virtual void | OnDestroy () |
virtual void | OnDisable () |
Removes this modifier from list of active modifiers. More... | |
virtual void | OnEnable () |
Adds this modifier to list of active modifiers. More... | |
override void | Reset () |
Handle serialization backwards compatibility. More... | |
Protected Member Functions inherited from VersionedMonoBehaviour | |
virtual int | OnUpgradeSerializedData (int version, bool unityThread) |
Handle serialization backwards compatibility. More... | |
Static Protected Member Functions inherited from GraphModifier | |
static List< T > | GetModifiersOfType< T > () |
Protected Attributes inherited from GraphModifier | |
ulong | uniqueID |
Unique persistent ID for this component, used for serialization. More... | |
Static Protected Attributes inherited from GraphModifier | |
static Dictionary< ulong, GraphModifier > | usedIDs = new Dictionary<ulong, GraphModifier>() |
Maps persistent IDs to the component that uses it. More... | |
|
virtual |
Connects the start and end points using a link or refreshes the existing link.
If you have moved the link or otherwise modified it you need to call this method.
void OnDrawGizmos | ( | ) |
|
virtual |
Called after graphs have been updated.
This is among other times called after graphs have been scanned, updated using GraphUpdateObjects, navmesh cuts, or GraphUpdateScene components.
Use this if you are modifying any graph connections or walkability.
Reimplemented from GraphModifier.
float costFactor = 1.0f |
The connection will be this times harder/slower to traverse.
Note that values lower than one will not always make the pathfinder choose this path instead of another path even though this one should lead to a lower total cost unless you also adjust the Heuristic Scale in A* Inspector -> Settings -> Pathfinding or disable the heuristic altogether.
bool deleteConnection = false |
Delete existing connection instead of adding one.
Transform end |
End position of the link.
bool oneWay = false |
Make a one-way connection.
|
get |
|
get |