Hi,
So I believe I have set up my grid graph correctly but whenever I make changes to my current scene the graph will get unloaded and I will get a “No graphs in scene error”.
I’ve tried to address this issue by loading the graph from a file like so
public class GenerateNavMesh : MonoBehaviour
{
AstarPath path;
private void Awake()
{
path = this.GetComponent<AstarPath>();
byte[] bytes = path.data.SerializeGraphs();
AstarPath.active.data.DeserializeGraphs(bytes);
AstarPath.active.Scan();
}
}
But this seems to be ineffective.
Here’s my settings on the pathfinding component.
If I rescan the graph again and hit the play button, it will work again, but after i hit the play button a few more times or change something in my scene, it will break again.