I’m trying to write this blueprint that i made, in C++ but i’m having some troubles finding the blueprint version of this nodes in C++.
I think this is what you’re looking for.
UStaticMeshComponent* MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("<name>")); MeshComponent->SetStaticMesh(<your mesh as UStaticMesh*>);
^ Create and set static mesh.
v Attach static mesh to actor.
is the preferred way to attach components in constructors btw.
How do I retrieve the mesh information from one of my meshes to enter into the SetStaticMesh function?