[FEATURE REQUEST] Construction script for BP components

Hi,

Just sent you a skype msg :stuck_out_tongue:

I recreated a simple example case, and its still not working :frowning:
If I call the building function of the child from within the parents constructor… nothing happens.

Here is an overview:

This is a simple BP that creates some meshes, based on an Instance and height offset parameter.
The implementation happens in the BuildStuff function.

This is the BuildStuff function:

If I place them in the level, they work like a charm, even at construction time:

SubEditor.JPG

So, now I define a struct for some data for the ā€œMasterā€ BP:

7a29bf14c8a59d3d972ccc17fda7a5deaf2eb6c2.jpeg

And the Master BP also implements its stuff in a dedicated function, called BuildBPs:

The implementation of BuildBPs spawns now the SubBPs and calls its BuildStuff function…

f5e966e9703f4ab6d97387cbf304ec8e9206ceb5.jpeg

But in the editor, nothing is happening. Not at designtime, nor during gameplay of course… :frowning:

c61a4fdb91209abbe5d0bb3a44d6c8668d73a9e3.jpeg

BUT: If I hook up the BuildBPs function in the master BP begin play event, like so:

7f9e66026fd965bd542c2f1d146dc230ef219410.jpeg

Then I get the spawning during gameplay:

d2c0a81104e1a1029a672dd554c8fa2b5d83c7e6.jpeg

But this is not really usefull for a lot of reasons. I cant design a whole urban environment ā€œinto the blindā€ and only see during PIE where my buildings are…
Since they are not spawned before BeginPlay, they cannot receive any lightmass attention. Hence the warning in the screenshot above…
Plus a lot of warnings about it:

Of course. I set them to be static, but spawning at Begin Play just isnt…

So even with the function being explicitly called… Nothing happens.
If that would be fixed/possible, Blueprint would be a fully fledged ā€œPrefabā€ system…

Or am I still doing something stupendously wrong here :confused:

Cheers,
Klaus