Create graph via editor script and save gameobject as prefab

Hi I’m trying to create a grid graph via editor script on an empty gameobject in my scene, configure that graph, and save the gameobject as prefab (all via editor script), but it seems not working, when I save the gameobject as prefab it contains an empty AstarPath component without the gridgraph I created. I noticed that when I select on my scene the gameobject with the astar component, it creates override containing the graph I just created. Would you have some inputs on the way to do that properly ? Thanks.

Hi

In the editor, you may have to run:

AstarPath.active.data.SetData(AstarPath.active.data.SerializeGraphs());

Thanks, it works as expected now !