Using procedural grid mover with cached start

Hi!

In my project I am using a cached start to reduce the load time of a recast graph, but I also need a grid graph to move in a procedural terrain. Unfortunately it seems that the cached start and the procedural grid mover do not work together. Is there a work around this issue?

Hi

In what way is it not working? I tested it, and it works exactly as expected.

Thanks for the response :smile:

I tried with the default cached start up and it works, it must be my own deserialization that is doing something wrong.

Iā€™m using this code to change the graph that should be deserialized, could you point me out a better way of doing it?

AstarData.active.data.DeserializeGraphs(graph.bytes);

GraphModifier.TriggerEvent(GraphModifier.EventType.PostCacheLoad);

Just to add some more info. I have been testing and it seens that if I try loading from the cache after start, the procedural grid mover stops working.

Hi

Probably the ProceduralGridMover found the graph when it started, but then when you loaded things from the cache the graph it was moving was destroyed. You can assign the graph that the procedural grid mover is using:

GetComponent<ProceduralGridMover>().graph = AstarPath.active.data.gridGraph;

That worked!

Thanks for all the help :smile:

1 Like