A* Pathfinding Project

Writing Graph Generators: No graph of type 'PolarGraph'


#1

Hello,

I’m trying to follow documentation and write a graph generator that extends point graph. However I’m constantly getting Caught exception while deserializing data. System.Exception: No graph of type 'PolarGraph' could be created, type does not exist at Pathfinding.Serialization.GraphMeta.GetGraphType (System.Int32 index)

I’ve copied your example from documentation, graph can be added to scene and scanned, but when scene is run or reloaded I have this error as well and graph disappears from the list. Could you please advise?

Using A* 4.2.4, Unity 2018.3.0

Thanks.


#2

Sorry to bump this up. Tried all solutions found in this forum, but with no result.


#3

There’s currently an issue where graphs defined in a different assembly can’t be found when loading from saved data/deserializing.
Here’s another thread about it with a couple of workarounds:

I added the workaround at the end by founderio to AstarPathfindingProject/Core/Serialization/JsonSerializer.cs and my custom graph now loads properly without needing to be in an astar subfolder anymore.


#4

Thanks, I’ll try your solution.


#5

Hi

Thanks for reporting this.
I have uploaded version 4.2.5 now which fixes this bug (or it will be uploaded in a few minutes at least).

You can download it at https://www.arongranberg.com/astar/download