So I am coming from Unity/UDK.
Apparently the concept of a preset configuration of actors/components in a hierarchy is now one of the several things that share the name “blueprint” (is a Prefab in Unity, and I think it was called artifact in UDK)
However what I cant seem to figure out is what the best practice is for connecting these things together internally.
Lets say I have the following “blueprint”
SomeGuy (UMyActorClass, Blueprint)
∟Child1 (SceneComponent)
∟Child2 (SceneComponent)
[INDENT]∟Grandchild1 (SceneComponent)
∟Grandchild2 (SceneComponent)[/INDENT]
UMyActorClass happens to also have 4 variables
USceneComponent* Child1;
USceneComponent* Child2;
USceneComponent* Grandchild1;
USceneComponent* Grandchild2;
I have seen three ways to approach this
1. Create the children in C++
Basically, in UMyActorClass::BeginPlay(), create the children. This is fine if what your doing happens to allow you to do this. In my case, however, I want artists to be able to tweak those children in relation to eacother in the editor. I could create separate blueprints for each of those children, but obviously thats a pretty heavy handed thing to do and kinda defeats the purpose as artists wont be able to manipulate the whole object at once
2. Manually assign all variables using the ‘blueprint’ GUI
Putting aside feeling like a child connecting boxes with lines, this technically works. However its really clunky (and fragile). More so if Child2 happens to be a class that references its own children. If I have to connect child variables to grandchild boxes in my parent blueprint ill wind up with a spagettii of boxes and lines just to assign variables – making me thing is not the best practice way to do this.
3. “Searching” for children in C++ in UMyActorClass::BeginPlay()
Aside from the fact that there does not seem to be a mature way to do this (everything I have seen involves you literally creating a for loop and iterating over children and checking string names when you assign in the editor, yuck), this technique does not seem to work properly in the editor. The C++ BeginPlay() only seems to be called at runtime, where as the junky blueprint “Event BeginPlay” seems to be able to assign variables that the editor.
Clearly this is such a common thing that I must be missing something conceptually! What am I missing, how is this normally done?