Generate NavMesh based on a gameObject in Unity Editor

Is it possible to generate a mesh that can be used in a NavMeshGraph based on some gameobjects in the unity scene?
For example a RageSpline mesh?
What is the easiest way to create a NavMesh inside the Unity Editor?

If you have the mesh, you can use a navmesh graph, it takes a source mesh to be used.

I may be looking over something. I have a RageSpline gameObject (with a mesh filter/renderer), how can I set this to be the source for the NavMeshGraph?

I have not used RageSpline myself, so I am not very familiar with how it works.
I don’t think the mesh is stored as an asset, so you would have to, via script.

  1. Get the meshFilter.sharedMesh obj
  2. Set (AstarPath.active.graphs[0] as NavmeshGraph).source = thatMesh
  3. AstarPath.active.Scan() to recalculate everything.

Works perfectly, thanks!

Just in case someone is looking for this: here is my code that combines multiple meshes in a GameObject into one navmesh and puts it in a NavMeshGraph.

`
private void GenerateCombinedNavMesh()
{
// combine meshes
GameObject walkareaHolder= GameObject.Find(“WalkAreaHolder”);
WalkArea[] walkareas = walkareaHolder.GetComponentsInChildren();
CombineInstance[] combine = new CombineInstance[walkareas.Length];
int i = 0;
while (i < walkareas.Length) {
MeshFilter meshFilter = walkareas[i].gameObject.GetComponent();
combine[i].mesh = meshFilter.sharedMesh;
combine[i].transform = meshFilter.transform.localToWorldMatrix;
walkareas[i].gameObject.SetActive(false);
i++;
}

MeshFilter mF = gameObject.AddComponent<MeshFilter>();
mF. = "Combined NavMesh";
mF.mesh = new Mesh();
    mF.mesh.CombineMeshes(combine);
gameObject.SetActive(true);
			
// generate navmesh
Mesh navMesh = mF.sharedMesh;				
NavMeshGraph navMeshGraph = AstarPath.active.graphs[0] as NavMeshGraph;
navMeshGraph.sourceMesh = navMesh;
AstarPath.active.Scan();

}
`