Class AstarPath Extends VersionedMonoBehaviour
Core component for the A* Pathfinding System.
This class handles all of the pathfinding system, calculates all paths and stores the info.
This class is a singleton class, meaning there should only exist at most one active instance of it in the scene.
It might be a bit hard to use directly, usually interfacing with the pathfinding system is done through the Seeker class.
Inner Types
Public Methods
Will apply queued graph updates as soon as possible, regardless of batchGraphUpdates.
Captures a snapshot of a part of the graphs, to allow restoring it later.
Public Static Methods
Used outside of play mode to initialize the AstarPath object even if it has not been selected in the inspector yet.
Adds the path to a queue so that it will be calculated as soon as possible.
Public Variables
Returns if any graph updates are being calculated right now.
Returns if any graph updates are waiting to be applied.
Returns if any work items are in progress right now.
Returns whether or not multithreading is used.
Number of parallel pathfinders.
Throttle graph updates and batch them to improve performance.
Holds all graph data.
The mode to use for drawing nodes in the sceneview.
Holds settings for heuristic optimization.
Do a full GetNearest search for all graphs.
Minimum number of seconds between each batch of graph updates.
The distance function to use as a heuristic.
The scale of the heuristic.
True while any graphs are being scanned.
The amount of debugging messages.
If set, the debugFloor and debugRoof values will not be automatically recalculated.
Max number of milliseconds to spend on pathfinding during each frame.
Maximum distance to search for nodes.
Max Nearest Node Distance Squared.
Handles navmesh cuts.
Holds all active off-mesh links.
If true, all graphs will be scanned during Awake.
Shows or hides graph inspectors.
Visualize graphs in the scene view (editor only).
If enabled, nodes will draw a line to their 'parent'.
Toggle to show unwalkable nodes.
Number of pathfinding threads to use.
Size of the red cubes shown in place of unwalkable nodes.
Public Static Variables
Which branch of the A* Pathfinding Project is this release.
Used by the editor to guide the user to the correct place to download updates.
Called when pathID overflows 65536 and resets back to zero.
Called on Awake before anything else is done.
Called for each graph after they have been scanned.
Called for each graph before they are scanned.
Called when any graphs are updated.
Called after scanning has completed fully.
Called for each path after searching.
Called for each path before searching.
Called right after callbacks on paths have been called.
Called after scanning.
Called before starting the scanning.
The version number for the A* Pathfinding Project.
Public Enums
Information about where the package was downloaded.
Private/Protected Members
Blocks until the currently running async scan (if any) has completed.
Returns if this code is currently being exectuted inside a work item.
Cached NNConstraint to avoid unnecessary allocations.
Checks if any work items need to be executed then runs pathfinding for a while (if not using multithreading because then the calculation happens in other threads) and then returns any calculated paths to the scripts that requested them.
If an async scan is running, this will be set to the coroutine.
The path to debug using gizmos.
The path ID to debug using gizmos.
Global read-write lock for graph data.
Processes graph updates.
Makes sure QueueGraphUpdates will not queue multiple graph update orders.
Holds a hierarchical graph to speed up some queries like if there is a path between two nodes.
Debug string from the last completed path.
Time the last graph update was done.
The next unused Path ID.
Holds global node data that cannot be stored in individual graphs.
Holds all paths waiting to be calculated and calculates them.
Holds all completed paths waiting to be returned to where they were requested.
Stored tag names.
Held if any work items are currently queued.
Processes work items.
Deprecated Members
Prioritize graphs.