Make CreateGraph(System.Type) public?

In AstarData CreateGraph (string) is public, but marked as obsolete.

Currently CreateGraph(System.Type) is internal, so I’m left with no choice but to use the obsolete method.

Using A* Pathfinding 4.3.47

Hi

The recommended alternative method to use is AstarData.AddGraph. CreateGraph is mostly for internal use.

The original use case was to procedurally generate a world, and use CreateGraph for the newly created parts of the world.

How can I achieve this behavior without CreateGraph?

I’m assuming I would have to create graphs beforehand for the chunks of the world. When the chunks get generated, use AddGraph.

Hi

When using CreateGraph, the only reasonable use case would be something like:
data.AddGraph(data.CreateGraph(...))
Instead, just do data.AddGraph(typeof(...))

1 Like