having trouble trying to spawn navMeshBoundVolume from c++

I’m working on a level loader from a plain text file, i have almost all my assets spawned and working dynamically.

I have added a feature to let the objects from the map to spawn in Editor without the need to run the game (on construction Time).

now i’m trying to spawn navMesh Bound volumes to add navigation to the level loader but it is not working.

the NavMesh spawns, but it doesn’t have the volume attached and also it doesn’t make any path on the level.

Here is the code that i’m using to spawn the navmeh, maybe someone faced this issue before and can help me to figure out what i’m doing wrong.

AActor* UNavMeshVolumeFactory::CreateActor(UWorld* World, const FTransform& Transform, const FActorBuildConfig& ActorConfiguration, const FActorSpawnParameters& Params)
{
	if (!World) return nullptr;
	

	if (ANavMeshBoundsVolume* NavVolume = World->SpawnActor<ANavMeshBoundsVolume>(ANavMeshBoundsVolume::StaticClass(), Transform, Params))
	{
		NavVolume->Rename(*ActorConfiguration.Name.ToString());
		NavVolume->SetActorLabel(*ActorConfiguration.Name.ToString());
		NavVolume->SetFolderPath(GetFolderName());
		
#if WITH_EDITOR
		if (GEditor)
		{
			if (UCubeBuilder* CubeBuilder = Cast<UCubeBuilder>(GEditor->FindBrushBuilder(UCubeBuilder::StaticClass())))
			{
				FVector BoundsExtent = ActorConfiguration.VolumeExtents;
				CubeBuilder->X = BoundsExtent.X*2;
				CubeBuilder->Y = BoundsExtent.Y*2;
				CubeBuilder->Z = BoundsExtent.Z*2;
				CubeBuilder->Build(World, NavVolume);
				NavVolume->BrushBuilder = CubeBuilder;
				NavVolume->Modify();
				NavVolume->GetBrushComponent()->MarkRenderStateDirty();
				NavVolume->RerunConstructionScripts();
			}
		}
#endif
		
		if (UNavigationSystemV1* NavSys = UNavigationSystemV1::GetNavigationSystem(World))
		{
			NavSys->OnNavigationBoundsUpdated(NavVolume);
#if WITH_EDITOR
			if (NavSys)
				NavSys->Build();
#endif
		}

		return NavVolume;
	}

	return nullptr;
}

thanks in advance for all the help.