The A* Inspector

Brief overview of the various settings in the A* inspector.

The inspector of the AstarPath component has 5 sections.

  • Graphs: holds a list of all graphs in the scene

  • Settings: various pathfinding and editor settings

  • Save & Load: allows you to save and load graphs from files

  • Optimization: various optimizations that can be applied to the system using compiler directives

  • About: info about which version you have and some links to the documentation

There is also the 'Show Graphs' toggle which enables or disables the graphs from being rendered in the scene view, and lastly there is the 'Scan' button which recalculates all graphs. In the editor, graphs are not scanned unless you press this button (or use the keyboard shortcut, see Keyboard Shortcuts).

Graphs

In the graphs tab, you can see all graphs that are in the current scene. You may have multiple graphs and they are all stored in the AstarPath component (you do not create multiple AstarPath components). If you click on the 'Add New Graph' button, you will see a list of all graph types that you can create.

There are several graph types available in the package. Grids, manually created navmeshes, automatically created navmeshes (called recast graphs), point graphs, and you can even write your own custom graph types.

Next to each graph there are 5 icons.

They are:

  • eye: Shows or hides the graph from being rendered in the scene view. When the graph is hidden, this icon will turn red.

  • pen: Click on the pen to rename the graph. This can be very useful if you have many graphs and it is becoming hard to keep track of which one is which.

  • i: Clicking on the 'i' shows some information about how many nodes there are in the graph. Note that you must scan the graph for it to show anything relevant.

  • duplicate: Duplicates the graph. This can be useful if you want to have two graphs with only slightly different settings.

  • trash can: Deletes the graph.

Take a look at each graph's respective documentation for more info about their settings.

Settings

This section contains all global pathfinding and logging settings. Here you can you can for example set the number of threads to use for pathfinding (note that this is only for pathfinding, when graphs are scanned, they typically use the unity job system, which uses all cores of the machine). Or you can tweak the logging settings to get more information about what the system is doing.

Pathfinding

Thread Count

Number of pathfinding threads to use.

Max Nearest Node Distance

Maximum distance to search for nodes.

Heuristic

The distance function to use as a heuristic.

Heuristic Scale

The scale of the heuristic.

Advanced

Heuristic Optimization

If heuristic optimization should be used and how to place the pivot points.

Batch Graph Updates

Throttle graph updates and batch them to improve performance.

Update Interval

Minimum number of seconds between each batch of graph updates.

Scan on Awake

If true, all graphs will be scanned when the game starts, during OnEnable.

Debug

Path Logging

The amount of debugging messages.

Graph Coloring

The mode to use for drawing nodes in the sceneview.

Show Search Tree

If enabled, nodes will draw a line to their 'parent'.

Show Unwalkable Nodes

Toggle to show unwalkable nodes.

Colors

Here you can set the colors to be used in the scene view to visualize the graphs.

Tag Names

Here you can set the names of all tags.

Editor

Smooth Transitions

Animate dropdowns when they open and close.

Save & Load

This section allows you to save and load graphs to and from files.

Typically, the graphs will be scanned when the game starts. But if you have a large world, this may take some time. In that case, you can cache the scanned graph, so that it becomes much faster to load.

See

Take a look at this page for more information: Saving and Loading Graphs

Optimization

This section contains various features that can be enabled or disabled project-wide, using compiler directives.

You typically do not have to touch these at all. But they can in some cases give you small performance or memory improvements.

See

Take a look at this page for more information: Compiler Directives

About

This section shows the current version and links to the documentation.

Note

This always links to the latest non-beta documentation; however, you can find the documentation for older versions or beta releases by clicking on the 'Show Older Versions' button on the download page: https://www.arongranberg.com/astar/download

Show Graphs

This toggle, at the bottom of the inspector, enables or disables the graphs from being rendered in the scene view.

Show Graphs

Visualize graphs in the scene view (editor only).

Scan button

The scan button at the bottom of the inspector is used to calculate the graphs based on their settings and the world.

When editing settings in the inspector, it's handy to know that there's also a shortcut for scanning the graphs: Cmd+Alt+S (mac) or Ctrl+Alt+S (windows).

The graphs will also be scanned automatically when the game starts, by default.