How to create a AVolume (or ANavMeshBoundsVolume) using C++


I am currently writing a plugin, and I hope to spawn a NavMesh at the origin of the world with certain size in an empty map when user click the plugin button.

Originally, I was using the “GetWorld()->SpawnActor” to spawn a “ANavMeshBoundsVolume”. However this does not seems to work at all.

There is always a Map check warning saying “NavMesh Volume actor has a collision component with 0 radius - please delete”.

I am not sure what I can do with it, I have spent many days on this already, could not find any helpful guide to solve this.

Thank you very much!