I am trying to assign a mesh to my NavMeshGraph but no matter what I try I can’t get the syntax right and the error message from the title appears.
I just followed this thread:
linked thread
but it won’t compile.
Mesh navMesh = myMesh; NavMeshGraph navMeshGraph = AstarPath.active.graphs[0] as NavMeshGraph; navMeshGraph.sourceMesh = navMesh; AstarPath.active.Scan();