MPPM & Pathfinding Fatal Error

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.

Here is what I also tried.

I deleted the unity cache folder located here C:/User/[Username]/AppData/Local/Unity/cache and restarted Unity.

I completely removed the A* Pathfinding Project once more using the package manager and then redownloaded and reinstalled it.

No success so far. I really don’t know what went wrong.

Hi

I haven’t seen that before.
Do you have any more information about where this error comes from? A stack trace, for example.

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.

Screenshot 2024-03-25 184210

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.

Very strange. It looks like a unity bug. Maybe try a different version of Unity?
You can also try to delete Library/PackageCache

I already tried different Unity versions.

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.

1 Like

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

"com.arongranberg.astar": "file:C:/YOUR/ACTUAL/FILE/PATH/YourUnityProject/Packages/com.arongranberg.astar"

Sadly I now get a new error. But this is also known and I will hopefully find the solution.

Many thanks for your effort and help!

1 Like

Ah, I see.

Yeah, Unity’s package manager is not the most robust tool…
If you could report it to Unity, with your project, that’d would be amazing.

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.

1 Like