# How can i put some mesh with c++?

**URL:** <https://forums.unrealengine.com/t/how-can-i-put-some-mesh-with-c/671258>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, procedural-mesh\
**Created:** [October 17, 2022, 3:06pm UTC](https://forums.unrealengine.com/t/how-can-i-put-some-mesh-with-c/671258 "2022-10-17T15:06:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qwbit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Qwbit](https://forums.unrealengine.com/u/Qwbit)\
**Post date:** [October 17, 2022, 3:06pm UTC](https://forums.unrealengine.com/t/how-can-i-put-some-mesh-with-c/671258/1 "2022-10-17T15:06:17Z")

</div>

Hi i need to put different kind of mesh in a map at specific location with c++.

I saw some tutorial but they make only a blank mesh that is usless or make some triangle that is usless too.

Hi have to take some 3d object that already exist and put somewhere with an algorithm.

I won’t use blueprint, because i want to make a wave function collapse algorithm and if use blueprint i presume that all will be slow.

So i need to know how i can take a single or many 3d object in the scene at specific coordinate that i will make with an algorithm that i’ll make later, but for now i really need how i put some object in the scene.

I’m already going crazy just figuring out how to insert a cube!

---

<div class="post-metadata">

**Author:** ![bent.gross](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bent.gross](https://forums.unrealengine.com/u/bent.gross)\
**Post date:** [October 18, 2022, 12:57pm UTC](https://forums.unrealengine.com/t/how-can-i-put-some-mesh-with-c/671258/2 "2022-10-18T12:57:33Z")

</div>

Hi,

based upon this thread [https://forums.unrealengine.com/t/load-static-mesh-with-path-in-c/292234/2](https://forums.unrealengine.com/t/load-static-mesh-with-path-in-c/292234/2) you should be able to do something like this to load existing meshes through c++

```auto
TSubobject<UStaticMeshComponent> mesh = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("Mesh"));
const ConstructorHelpers::FObjectFinder<UStaticMesh> MeshObj(TEXT("/Game/Mesh/Cube/YourMesh"));
mesh->SetStaticMesh(MeshObj.Object);

```
