Issues importing version 5.4.5 via Unity Package Manager with Unity 6

Hi,

I’ve just purchased this on the Unity Asset Store, and imported version 5.4.5 into my project.

After downloading and importing, I see the Welcome screen appear, but it throws this error:

  • Expected exactly 1 sample. Found 0. This should not happen

Then, I get 8 “Assembly has duplicate references” errors as you can see in the image below:

To my knowledge I have not added any .asmdef packages manually to my project. I’m also using the Agents Navigation package from Project Dawn, but that’s been working fine and I’ve never had any issues with it.

I followed the installation guide, and the Unity Package Manager path specifically, but I’ve tried this multiple times and I always get this behaviour. I’ve found that if I manually remove duplicate guids in the mentioned asmdef files in the image myself I can remove these errors, but I’m not sure if that’s going to break the package later.

Appreciate anyone’s time in reading this. I’ve tried googling and searching the forum but I can’t find any other people having similar problems. I’m using Visual Studio 2022 and Resharper, with Unity 6.

Cheers,
Marcus

Hey there, can you share what duplicate references you removed? Looks like it may be related to another asset/package in the project or something?

Hey thanks for the response.

I removed from the following *.asmdef files, under “references”:

  • Packages\com.arongranberg.astar\AstarPathfindingProject.asmdef
  • Packages\com.arongranberg.astar\Drawing\Editor\DrawingEditor.asmdef
  • Packages\com.arongranberg.astar\Drawing\PackageTools\Editor\PackageToolsEditor.asmdef
  • Packages\com.arongranberg.astar\Editor\AstarPathfindingProjectEditor.asmdef
  • Packages\com.arongranberg.astar\PackageTools\Editor\PackageToolsEditor.asmdef
  • Packages\com.arongranberg.astar\PackageTools\PackageTools.asmdef
  • Packages\com.projectdawn.navigation\ProjectDawn.Navigation.Astar.Editor\ProjectDawn.Navigation.Astar.Editor.asmdef
  • Packages\com.projectdawn.navigation\ProjectDawn.Navigation.Astar\ProjectDawn.Navigation.Astar.asmdef

The following GUIDs (1-4 from each):

  • GUID:efa45043feb7e4147a305b73b5cea642
  • GUID:774e21169c4ac4ec8a01db9cdb98d33b
  • GUID:f4059aaf6c60a4a58a177a2609feb769
  • GUID:de4e6084e6d474788bb8c799d6b461eb

As they had the following non-GUID reference names already and so didn’t need the GUIDs as well (can’t recall which matched which):

  • AstarPathfindingProject
  • AstarPackageToolsEditor
  • PackageTools
  • Drawing

Then I was able to build and use the package without any other issues.

Hi

The asmdef files should ONLY be using GUIDs. Not sure why they contain non-GUID references for some reason?

Does this happen in an empty project for you?

I can import both this package and Agent Navigation together in a new empty project and don’t run into the same errors. I guess it was just something corrupted with my project. Thanks for the help!

1 Like