Placing hundreds of custom actors

Hi everyone!

I need to place lots of objects in the environment with custom exact locations and properties. There are several hundreds of them, maybe even updating the list later, so want to avoid manual editing as much as possible.
Is there a way to generate/spawn all these actors into a scene, setting their properties and world position from a data table? Either in runtime or in the editor (both have advantages/disadvantages, i guess)
I do have a data table for all the properties (position, name, ID, etc.), but i haven’t found any tutorials on how to generate a bunch of separate objects from it.
Do you have any tips on where should i start? Only blueprints, if possible.

Thank you very much!

Hi Tekergo,

With just a couple hundred, you might be able to spawn them directly by looping through a datatable.

If the objects have the same meshes, auto-instancing should be automatic. (To help with performance) As opposed to needing to create instanced static mesh components in the before-times.

The question is whether you want to work with the level in the editor, with the objects in place, or whether you just want to spawn the objects when the level starts playing. Looping over a datatable is harder when in the editor/level context, but can probably still be done.

I’d recommend something like an editor utility widget which lets you specify a CSV file of mesh asset and location and unique ID, and it’ll create that instance in the in-editor level. The unique ID could be used to move an existing object rather than re-create it if you import again; add it as some kind of Tag to the target object.

Loops as is aren’t really going to work.
The engine cuts their legs defining them as infinite after some really low number of iterations.

To do this from data coming outside the engine, I have a custom bluetility that does a single item at a time while checking off /deleting entires from a list.

Then I use AHK to click the button endlessly. Thus bypassing any engine BS about loops.

The moment the bluetility finds no entries to add it removes itself from the level, so that the button isnt there to be clicked.

When you get back 10 minutes after stsrting it, all you have to do is disable auto hot key and the level is populated for ya…

Thank you very much for all of you!
I’m really new to Unreal (coming from a general cgi/vfx area), so each of your sentences will take me a while to process and understand :smiley:
Editor utility widget definitely sounds interesting, will look into it for sure! Also that asteroid instancing looks nice, might be able to work for my case too.
Although i might end up spending more time on figuring all this stuff out, than by placing all the 300 actors by hand :smiley:
My first working attempt was this, but haven’t been able to set the different actors’ properties yet