Installation
This page shows you how to install the package.
Contents
- Installing from the Unity Asset Store
- Installing using the Package Manager via a Scoped Registry
- Installing manually
Installing from the Unity Asset Store
After you have purchased the pro version from the asset store, you can find it in the "My Assets" tab in Unity's package manager.
Click on "My Assets", find the A* Pathfinding Project and click on the "Import to project" button.
It is also recommended to import the example scenes. These are confusingly not accessible from the same place in the package manager. Instead, after you have imported the package, go to "In Project", click on the "A* Pathfinding Project [custom]" package (there may be two A* packages in this view), go to the "Samples" tab, and then click "Import".
All dependencies should be imported automatically.
Installing using the Package Manager via a Scoped Registry
You can also install the A* Pathfinding Project using a scoped registry via the package website (https://www.arongranberg.com/astar/download_upm). This is used to gain access to beta versions, and it's also easier to switch between different versions of the package using this method.
Follow the instructions on the linked page to add the scoped registry to your project, and then you can install the package using the package manager. Nothing else needs to be done after you have imported the package.
You can optionally import the example scenes from the Unity Package Manager. By default they are not imported.
Installing manually
Usually packages can simply be imported into Unity, however the A* Pathfinding Project has a few dependencies that need to be taken care of.
If you are installing the package for the first time then you can skip these instructions. There is a script that will automatically install the dependencies for you after you have imported the package. However if you are upgrading you need to install the dependencies manually since the automatic installation script will not be able to run if there are compiler errors in the package (which there will typically be if there are some missing dependencies).
Before importing the package, open the Unity Package Manager under Menubar => Window => Package Manager. Then you need to find and install the Burst, Mathematics and Collections packages. You also need the Unity UI package, however this is usually installed by default.
After you have done this you can import the package and it should compile without any errors.
Downloading
Make sure you have already installed the dependencies from the previous section. The project can be downloaded from here. You can either download the free version with some limited features (but still very powerful) or buy the pro version which has more cool stuff included.
You can continue with the Get Started With The A* Pathfinding Project tutorial when you have done this.
Installation Errors
Here's a list of errors that you might encounter when importing the package and how to fix them.
"Metadata file 'Library/PackageCache/com.unity.ext.nunit@1.0.6/net40/unity-custom/nunit.framework.dll' could not be found"
This error is caused by a Unity bug. Restarting Unity usually resolves the error.
The type or namespace name 'Pathfinding' could not be found
If the package seems properly installed, this might arise in your own scripts when you try to use the package. This is usually caused by using .asmdef files in your project. You will need to select the one relevant for your script, and add the AstarPathfindingProject assembly as a reference.
Other errors
If you encounter other errors, these are good things to try:
Make sure you are using a supported version of Unity.
Make sure you have installed the dependencies from the previous section.
Try to delete the package, and install it again.
Restart Unity.