Adding a Static Mesh Component to a custom actor + IDE woes

To create a new component at runtime just do something like this inside your Actor:


NewComp = NewObject<UStaticMeshComponent>(this);
NewComp->AttachTo(GetRootComponent());
NewComp->SetStaticMesh(MyMesh);
NewComp->RegisterComponent();