Hi!
I want to create a new actor and add some components to it, e.g. a StaticMeshComponent. However I can’t find any working examples or documentation how to achieve this. Does anyone know how this can be done in C++ and not with the blueprints?
The background is that I’m about to model a grid based RTS navigation system and planing to implement actors that will represent units. The units would therefore need a representation in the world and some other custom logic.
That worked great. I have some follow up questions though. Now I can see the model but I can’t move it around in the editor. JoyfulControl->AttachParent = Mesh; didn’t compile for me so I commented that out so maybe that’s why or should you add a SceneComponent to the actor as a root component?
I typed static ConstructorHelpers::FObjectFinder StaticMeshOb_AW2(TEXT(“StaticMesh’/Game/TestMdl’”)); but why did the example type …"/JoyControl_WindTurtle.JoyControl_WindTurtle" and not just “JoyControl_WindTurtle”.
And finally what function does the name parameter have in CreateDefaultSubobject, must i be unique per world, actor or not at all?