I’m using the A* Pathfinding Project for years now but I encountered a strange problem recently.
I’m working on a multiplayer game and I use Unity’s Multiplayer Play Mode (MPPM) for testing. Until recently I was able to use A* Pathfinding in combination with MPPM without any issues for months.
However, when I try to activate a second client in MPPM now I get an error message. It reads:
Fatal Error!
Compilation Pipeline: Could not read file
Packages/com.arongranberg.astar/PackageTools/PackageTools.asmdef
The problem is, I can not even tell when exactly MPPM stopped working and I’m not even 100% sure it has to do with the astar package. I’m not using any custom assembly definitions that I know of.
Any ideas? I already upgraded Astar to version 5.0.5 and Unity to 2023.2.15f1. MPPM is the latest stable version 0.6.0.
I just set stack trace logging to full and got this more detailed error message. Unfortunately I still don’t understand. By the way, the console does not output a single line.
But I did some testing and opened a version of my project from late january and I get the same error. And I know that it definitely worked back then. Kind of interesting, that the error is independent from Unity versions and project age. As if something on my system is broken.
I just tested the project on a different pc and it throws the same error.
Removing Library/PackageCache gives me 755 new errors in the console. I reversed that change.
I tried to remove Unity’s own cache in LOCALAPPDATA/Unity/Cache but it didn’t do anything.
I will keep on trying more stuff. On one hand, I think this must be an error in my project. Otherwise it would not be consistent with different Unity versions and on different machines. However, I’m surprised that I now get the same error in an older Unity version with a backup of my project from january which ran perfectly fine back then. So maybe you are right and it is a Unity bug. It could be wise to uninstall all Unity versions and also Unity Hub.
Huge news! I fixed it… kind of. It is indeed a Unity bug. Multiplayer Play Mode recently seems to have an issue with packages located in the Packages folder.
When you add a dependency in Packages/manifest.json, it does compile. The needed line is
I asked in the Unity forum for help with the new bug/error and also mentioned the dependency error. The Unity team is aware of these issues and are working on it. They also suggested that I upgrade to Unity 6 and MPPM 1.0 since some issues have already been fixed. I think I will give it a try.