How to make an array of spawned static meshes?

I’m spawning a lot of static meshes from an array like this:

How do I make an array from the static meshes spawned this way ? The only way I know of would be to get all actors by class and then remove everything that doesn’t have the appropriate tag but as far as I know it’s impossible to tag spawned meshes.

Any help is appreciated !


I’ve set up a simple test where I added Static Mesh Components using a for loop, and then added each component to an Array variable that I created.

First, you have to create a new variable of type Static Mesh Component->Reference, and ensure that you click the Array box next to the variable type (looks like a grid). Then, try to duplicate the blueprint that I have in the picture below:

What I’m doing is creating the meshes, and then once the loop is completed, I’m running through it and printing out the names of the components. (This is only for testing purposes to ensure that your array is being populated properly). Give that a shot and feel free to let me know if you have any further questions, or if something isn’t functioning properly.

Thanks, I ended up using a different method but I would’t have done it without your comment !! :slight_smile: