In the past I have beein struggling to create some logic that allows the automatic placement of actors (which create static mesh components) in levels.
I tried inheritance and working with the construction script
Doesnt work, because you cant spawn actors during the construction script.
Also child actor functions are not executed when triggered from construction script.
I tried blueprints components
Short story: BP components cant add static meshes.
I tried to build the logic within some macros
Same story: Within macros you cant add static meshes.
I tried child actor components
You cant access child actor component parameter, so useless.
So my last resort was now to use Blutilities, avoiding actor construction scripts altogether.
But here is what happens:
I have a Blueprint (based on actor), which has a function that adds some static meshes:
Another BP implements an event handler that calls a placement function:
The placement function now spawns ActorBP instances with different parameter and triggers their build function:
And when I try this in the level, it seems to work:
The meshes are not static. The add mesh component node is set to movable.
If I set them to static, so I can bake lighting on them, the result becomes this:
They are not created
If I connect the Build function to the construction script and them move the actors slightly, the meshes spawn as static, but its not possible to do this manually for all actors…
Now I ran out of all options that I could think of.
Is it realy that impossible to have actors procedurally placed in the level which add static meshes
I would like to create a vast urban environment. For that It would be nice to be able to have a Building actor that creates buildings, based on parameters and is placed by another actor and so forth.
It would be impossible to place 40000-60000 required meshes manually…