A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
MultiGridGraph Class Reference
+ Inheritance diagram for MultiGridGraph:
+ Collaboration diagram for MultiGridGraph:

Public Member Functions

void DeSerializeNodes (Node[] nodes, AstarSerializer serializer)
 
void DeSerializeSettings (AstarSerializer serializer)
 
void GenerateMatrix ()
 
override NNInfo GetNearest (Vector3 position, NNConstraint constraint, Node hint=null)
 Returns the nearest node to a position using the specified NNConstraint.
 
override void Scan ()
 Scans the graph, called from AstarPath.Scan Override this function to implement custom scanning logic
 
void SerializeNodes (Node[] nodes, AstarSerializer serializer)
 
void SerializeSettings (AstarSerializer serializer)
 
- Public Member Functions inherited from NavGraph
virtual void Awake ()
 This will be called on the same time as Awake on the gameObject which the AstarPath script is attached to.
 
virtual Node[] CreateNodes (int number)
 Creates a number of nodes with the correct type for the graph.
 
virtual void DeserializeExtraInfo (byte[] bytes)
 Deserializes graph type specific node data.
 
NNInfo GetNearest (Vector3 position)
 Returns the nearest node to a position using the default NNConstraint.
 
NNInfo GetNearest (Vector3 position, NNConstraint constraint)
 Returns the nearest node to a position using the specified NNConstraint.
 
virtual NNInfo GetNearestForce (Vector3 position, NNConstraint constraint)
 Returns the nearest node to a position using the specified constraint.
 
bool InSearchTree (Node node, Path path)
 Returns if the node is in the search tree of the path.
 
virtual Color NodeColor (Node node, NodeRunData data)
 
virtual void OnDestroy ()
 Function for cleaning up references.
 
virtual void OnDrawGizmos (bool drawNodes)
 
virtual void PostDeserialization ()
 Called after all deserialization has been done for all graphs.
 
virtual void RelocateNodes (Matrix4x4 oldMatrix, Matrix4x4 newMatrix)
 Relocates the nodes in this graph.
 
void SafeOnDestroy ()
 SafeOnDestroy should be used when there is a risk that the pathfinding is searching through this graph when called
 
void ScanGraph ()
 Consider using AstarPath.Scan () instead since this function might screw things up if there is more than one graph.
 
virtual byte[] SerializeExtraInfo ()
 Serializes graph type specific node data.
 
- Public Member Functions inherited from ISerializableGraph
Node[] CreateNodes (int num)
 
void DeSerializeNodes (Node[] nodes, AstarSerializer serializer)
 
void SerializeNodes (Node[] nodes, AstarSerializer serializer)
 
- Public Member Functions inherited from ISerializableObject
void DeSerializeSettings (AstarSerializer serializer)
 Called to deserialize the object.
 
void SerializeSettings (AstarSerializer serializer)
 Called to serialize the object.
 

Public Attributes

float cellHeight = 0.4F
 
float cellSize = 0.5F
 
GraphCollision collision
 
GridNode[] graphNodes
 
float maxSlope = 30
 
float nodeSize = 1
 
int scans = 0
 
float walkableClimb = 0.5F
 
float walkableHeight = 2F
 
- Public Attributes inherited from NavGraph
byte[] _sguid
 Used to store the guid value.
 
AstarPath active
 Reference to the AstarPath object in the scene.
 
bool drawGizmos = true
 
bool infoScreenOpen
 Used in the editor to check if the info screen is open.
 
uint initialPenalty = 0
 
Matrix4x4 matrix
 A matrix for translating/rotating/scaling the graph.
 
string name
 
Node[] nodes
 All nodes this graph contains.
 
bool open
 Is the graph open in the editor
 

Additional Inherited Members

- Properties inherited from NavGraph
Guid guid [get, set]
 Used as an ID of the graph, considered to be unique.
 
Matrix4x4 inverseMatrix [get]
 

Member Function Documentation

override NNInfo GetNearest ( Vector3  position,
NNConstraint  constraint,
Node  hint = null 
)
virtual

Returns the nearest node to a position using the specified NNConstraint.

Parameters
positionThe position to try to find a close node to
hintCan be passed to enable some graph generators to find the nearest node faster.
constraintCan for example tell the function to try to return a walkable node. If you do not get a good node back, consider calling GetNearestForce.

Reimplemented from NavGraph.

override void Scan ( )
virtual

Scans the graph, called from AstarPath.Scan Override this function to implement custom scanning logic

Implements NavGraph.

+ Here is the call graph for this function:


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