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

Public Member Functions

void Apply (bool forceNewCheck)
 
void InternalOnPostScan ()
 
void OnDrawGizmos ()
 
void OnDrawGizmos (bool selected)
 
virtual void OnDrawGizmosSelected ()
 
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.
 

Static Public Member Functions

static NodeLink3 GetNodeLink (GraphNode node)
 
- Static Public Member Functions inherited from GraphModifier
static void FindAllModifiers ()
 
static void TriggerEvent (GraphModifier.EventType type)
 Triggers an event for all active graph modifiers.
 

Public Attributes

float costFactor = 1.0f
 The connection will be this times harder/slower to traverse.
 
Transform end
 End position of the link.
 
bool oneWay = false
 Make a one-way connection.
 

Protected Member Functions

override void OnDisable ()
 Removes this modifier from list of active modifiers.
 
override void OnEnable ()
 Adds this modifier to list of active modifiers.
 

Static Protected Attributes

static Dictionary< GraphNode,
NodeLink3
reference = new Dictionary<GraphNode,NodeLink3>()
 

Properties

GraphNode EndNode [get]
 
Transform EndTransform [get]
 
GraphNode StartNode [get]
 
Transform StartTransform [get]
 

Private Member Functions

void ContextApplyForce ()
 
void DrawCircle (Vector3 o, float r, int detail, Color col)
 
void DrawGizmoBezier (Vector3 p1, Vector3 p2)
 
void RemoveConnections (GraphNode node)
 

Private Attributes

Vector3 clamped1
 
Vector3 clamped2
 
MeshNode connectedNode1
 
MeshNode connectedNode2
 
NodeLink3Node endNode
 
bool postScanCalled = false
 
NodeLink3Node startNode
 

Static Private Attributes

static readonly Color GizmosColor = new Color(206.0f/255.0f,136.0f/255.0f,48.0f/255.0f,0.5f)
 
static readonly Color GizmosColorSelected = new Color(235.0f/255.0f,123.0f/255.0f,32.0f/255.0f,1.0f)
 

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...
 

Member Function Documentation

void Apply ( bool  forceNewCheck)
void ContextApplyForce ( )
private
void DrawCircle ( Vector3  o,
float  r,
int  detail,
Color  col 
)
private
void DrawGizmoBezier ( Vector3  p1,
Vector3  p2 
)
private
static NodeLink3 GetNodeLink ( GraphNode  node)
static
void InternalOnPostScan ( )
override void OnDisable ( )
protectedvirtual

Removes this modifier from list of active modifiers.

Reimplemented from GraphModifier.

void OnDrawGizmos ( )
void OnDrawGizmos ( bool  selected)
virtual void OnDrawGizmosSelected ( )
virtual
override void OnEnable ( )
protectedvirtual

Adds this modifier to list of active modifiers.

Reimplemented from GraphModifier.

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).
See Also
OnLatePostScan

Reimplemented from GraphModifier.

void RemoveConnections ( GraphNode  node)
private

Member Data Documentation

Vector3 clamped1
private
Vector3 clamped2
private
MeshNode connectedNode1
private
MeshNode connectedNode2
private
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.

Transform end

End position of the link.

NodeLink3Node endNode
private
readonly Color GizmosColor = new Color(206.0f/255.0f,136.0f/255.0f,48.0f/255.0f,0.5f)
staticprivate
readonly Color GizmosColorSelected = new Color(235.0f/255.0f,123.0f/255.0f,32.0f/255.0f,1.0f)
staticprivate
bool oneWay = false

Make a one-way connection.

bool postScanCalled = false
private
Dictionary<GraphNode,NodeLink3> reference = new Dictionary<GraphNode,NodeLink3>()
staticprotected
NodeLink3Node startNode
private

Property Documentation

GraphNode EndNode
get
Transform EndTransform
get
GraphNode StartNode
get
Transform StartTransform
get

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