A* Pathfinding Project  4.1.2
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
NodeLink Class Reference

Connects two nodes with a direct connection. More...

Detailed Description

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 ()
 
void InternalOnPostScan ()
 
void OnDrawGizmos ()
 
override void OnGraphsPostUpdate ()
 Called after graphs have been updated using GraphUpdateObjects.
 
override void OnPostScan ()
 Called right after all graphs have been scanned.
 
- Public Member Functions inherited from GraphModifier
virtual void OnGraphsPreUpdate ()
 Called before graphs are updated using GraphUpdateObjects.
 
virtual void OnLatePostScan ()
 Called at the end of the scanning procedure.
 
virtual void OnPostCacheLoad ()
 Called after cached graphs have been loaded.
 
virtual void OnPreScan ()
 Called right before graphs are going to be scanned.
 

Public Attributes

float costFactor = 1.0f
 The connection will be this times harder/slower to traverse.
 
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.
 

Properties

Transform End [get]
 
Transform Start [get]
 

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
}
 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.
 
- Protected Member Functions inherited from GraphModifier
override void Awake ()
 
virtual void OnDestroy ()
 
virtual void OnDisable ()
 Removes this modifier from list of active modifiers.
 
virtual void OnEnable ()
 Adds this modifier to list of active modifiers.
 
- 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.
 
- Static Protected Attributes inherited from GraphModifier
static Dictionary< ulong,
GraphModifier
usedIDs = new Dictionary<ulong, GraphModifier>()
 Maps persistent IDs to the component that uses it.
 

Member Function Documentation

virtual void Apply ( )
virtual
void InternalOnPostScan ( )
void OnDrawGizmos ( )
override void OnGraphsPostUpdate ( )
virtual

Called after graphs have been updated using GraphUpdateObjects.

Eventual flood filling has been done

Reimplemented from GraphModifier.

override void OnPostScan ( )
virtual

Called right after all graphs have been scanned.

FloodFill and other post processing has not been done.

Warning
Since OnEnable and Awake are called roughly in the same time, the only way to ensure that these scripts get this call when scanning in Awake is to set the Script Execution Order for AstarPath to some time later than default time (see Edit -> Project Settings -> Script Execution Order).
Todo:
Is this still relevant? A call to FindAllModifiers should have before this method is called so the above warning is probably not relevant anymore.
See Also
OnLatePostScan

Reimplemented from GraphModifier.

Member Data Documentation

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.

Property Documentation

Transform End
get
Transform Start
get

The documentation for this class was generated from the following file: