V5.0.2 Won't Compile - Assembly Definitions

I just upgraded to v5.0.2 using the “Install with UPM” steps, but unfortunately it won’t compile (Unity 2022.3.6f1).

Errors seem to be specific to the below three files:

  • Library\PackageCache\com.arongranberg.astar@5.0.2\Drawing\GeometryBuilder.cs
  • Library\PackageCache\com.arongranberg.astar@5.0.2\Drawing\DrawingManager.cs
  • Library\PackageCache\com.arongranberg.astar@5.0.2\Drawing\CommandBuilder.cs

For example:

Library\PackageCache\com.arongranberg.astar@5.0.2\Drawing\CommandBuilder.cs(135,92): error CS0246: The type or namespace name ‘RedrawScope’ could not be found (are you missing a using directive or an assembly reference?)
Or
Library\PackageCache\com.arongranberg.astar@5.0.2\Drawing\GeometryBuilder.cs(35,97): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type (‘ProcessedBuilderData.MeshBuffers’)

Regarding Assembly Definitions, the instructions say:

You can do this by opening your .asmdef file in the Unity inspector and adding the following items to the Assembly Definition References list:

  • AstarPathfindingProject
  • PackageTools
  • ALINE

I’m unclear how to find “your .asmdef file” - does this mean the .asmdef file in the AstarPathfindingProject folder? Or a different one? How do I find the relevant .asmdef file(s) if so?

Also when adding references to an assembly definition “PackageTools.asmdef” isn’t in the list of available assembly definitions.

I’m unclear how to find “your .asmdef file” - does this mean the .asmdef file in the AstarPathfindingProject folder? Or a different one? How do I find the relevant .asmdef file(s) if so?

This is only necessary if you are using any .asmdef files yourself. Not in the A* package, but for your own code.

Are you sure you deleted your previous installation before installing the 5.0 version?

Apparently not :sweat_smile: That fixed it - thanks very much!