Hi,
Is it possible to write my own C++ component and attach it to an actor.
I realize there are components like box, cone, cylinder etc.
What I want to do is write my own component as a static mesh in C++ and attach it to my actor.
Is this possible ?
Thank you in advance.
Hey CJD,
what exactly are you trying to accomplish?
If you want to attach a StaticMeshComponent with added behaviour (from your side) you only have to create a new Component which derives from StaticMeshComponent.
UCLASS()
class UCustomStaticMeshComponent : public UStaticMeshComponent
{
GENERATED_BODY()
//...
}
Greetings
Hi ,
Thanks for the response.
I have a map written in Visual Studio using DirectX9. What I am trying to accomplish is to render this map in Unreal. I thought the best way to do this was attach it to static mesh component and render it that way. Would this be correct. Essentially I want the ability for Unreal to delegate the rendering process to my C++ rendering code.Is this possible and what would be the best way to go about this. Do you have any tips or tutorials you could point me to.