A* Pathfinding Project

NavMeshCut breaks NavmeshGraph's Offset data


#1

Hi,

I load and using Navmesh Graph files at run time.
However, if there is an object with the component of NavMeshCut on the stage, the offset data of the loaded NavmeshGraph will be cleared.

If you attach Mesh to Source Mesh of Navmesh Graph from the beginning with AstarPath Inspector, the problem will not occur.

I confirmed that this problem occurred in versions 4.2.2 and 4.2.5.

Thank you for the awesome asset :slight_smile:


#2

Hi

Could you show the code you are using for this?


#3

Thank you for your reply!

Here is my code.

protected void loadNavMesh(string name){
	Addressables.LoadAsset<TextAsset>(name).Completed +=  op => { 
		NavGraph = op.Result;
		AstarPath.active.data.DeserializeGraphs(NavGraph.bytes);
	};
}

I am reading the NavmeshGraph using the Addressable Assets System.
It was the same even if I read the graph data attached to the game object without using Addressable Assets System.

By the way, if SourceMesh was left in the Resources folder, the position of the graph was not broken.


#4

Hi

I figured out what the problem was!
I have uploaded version 4.2.6 which fixes this bug.

Thanks for reporting it!


#5

Thatโ€™s excellent!
When I tried it with version 4.2.6, it worked without the problem.

Thank you very much for your response!:joy: