I am new to UE4 and I am trying to build my own tool within the editor, i.e. I try to give designers the possibility to add something like a path to the world. The path can then be modified and more elements can be added to increase the size of the path. Something similar to the UE4 spline tool.
Unfortunately I cannot figure out how to react to an actor placement in the editor. I guess I have to start to generate the content of the first path element as soon as my ‘path-creator-actor’ is dropped into the world.
But how do I do this? And how can I react to following mouse clicks into the world in order to place/continue my path?
Is something like this even possible?
Thanks a lot.
This is related to my helplessness to create ANYTHING at edit/design time.
The generated C++ code seems to build around the idea that everything starts with clicking “Play”.
Has anybody found a way to place actors at edit time?
This drives me crazy!:mad:
You will find this is a “dark corner” of Unreal development with little to no documentation. You will need to do a lot of searching, digging, and posting probably as you venture down this path.
Specifically to this question as IrishKilter has pointed out, there are some events you can hook into for editor time actions. See also the Actor Lifecycle documentation.
One thing to note about OnConstruction() is that it passes in the transform for the new actor, but the actor itself doesn’t have that information, so if you need it you need to use what was passed in.