Hello, I am currently creating a plugin, where if I click on the button, it will spawn some static meshes as well as an ANavMeshBoundsVolume on an empty map.
Initially, I have tried something like
ANavMeshBoundsVolume* BoundsVolume = World->SpawnActor<ANavMeshBoundsVolume>( ANavMeshBoundsVolume::StaticClass(), FTransform());
It does give me an ANavMeshBoundsVolume, But it was not functioning at all. I have noticed that the “Brush Settings/Brush Shape” in details is missing compared to when I drag a Nav Mesh Bounds Volume from the left panel.
(The Icon looks different)
So I did some search online and tried adding:
UCubeBuilder* CubeBuilder = Cast<UCubeBuilder>(GEditor->FindBrushBuilder(UCubeBuilder::StaticClass())); CubeBuilder->X = 200; CubeBuilder->Y = 200; CubeBuilder->Z = 200; CubeBuilder->Build(World, BoundsVolume); BoundsVolume->BrushBuilder = CubeBuilder;
Still, It does was not functioning at all.
But a least this time it has the identical “Brush Settings/Brush Shape” in detail.
And this thing shows up:
I have also tired SpawnActorDeferred, no effects at all. It seems like the problem is because of the volume actor’s collision component was wrong some how.
I am not sure what I can do with it. I have been stuck on this for two weeks already.