# Problem Spawning ANavMeshBoundsVolume in editor

**URL:** <https://forums.unrealengine.com/t/problem-spawning-anavmeshboundsvolume-in-editor/134487>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 4, 2019, 9:17pm UTC](https://forums.unrealengine.com/t/problem-spawning-anavmeshboundsvolume-in-editor/134487 "2019-12-04T21:17:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Not-Soup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Not-Soup](https://forums.unrealengine.com/u/Not-Soup)\
**Post date:** [May 27, 2020, 5:36am UTC](https://forums.unrealengine.com/t/problem-spawning-anavmeshboundsvolume-in-editor/134487/2 "2020-05-27T05:36:44Z")

</div>

Are you still having trouble with this? If so I had some luck with the following:

```auto

FTransform NavMeshTransform = FTransform();
NavMeshTransform.SetScale3D(FVector(500, 500, 500));
NavMeshTransform.SetLocation(FVector(0, 0, 0));

ANavMeshBoundsVolume* BoundsVolume = GetWorld()->SpawnActor<ANavMeshBoundsVolume>(ANavMeshBoundsVolume::StaticClass(), NavMeshTransform);

UCubeBuilder* CubeBuilder = Cast<UCubeBuilder>(GEditor->FindBrushBuilder(UCubeBuilder::StaticClass()));
CubeBuilder->X = 200;
CubeBuilder->Y = 200;
CubeBuilder->Z = 200;
CubeBuilder->Build(World, BoundsVolume);
BoundsVolume->BrushBuilder = CubeBuilder;

```

\*\* Make sure “UnrealEd” and “NavigationSystem” are added to your Build.cs PublicDependencyModuleNames

---

_[View the full topic](https://forums.unrealengine.com/t/problem-spawning-anavmeshboundsvolume-in-editor/134487)._
