Changing the class every time the event is called

I have an event that’s called every 15 seconds and it spawns an actor of a certain class(inside a widget). I want to change the class after each spawn to the next one. I tried creating a class array and add the classes that I need on pre construct, then when spawning I get the class and increment the index. It works, but what if I have 50 or 60 classes? The blueprint would be huge.

And the most important thing is, having classes in a 10 size group.
By default use the first 10 classes in order to spawn the actors and must stop at 10.
If I press a button then I can select which group of 10 classes to spawn in order.
I don’t want to be able to select the class while playing, but rather in the menu.

A simple example to understand this would be spawning 10 red cubes with different opacity(from non-opaque to almost opaque). Then If I want to I can go in the menu and switch to spawning 10 green cubes with different opacity, or 10 yellow cubes. You get the idea.
How can I create this class “map”?

I found out about structs, and I’m suposed to use them to create some sort of an array of arrays.
The problem is when creating a class array inside the struct it must be a type of actor. I can create an array for each individual cube, and not an “empty” one and set the class for 10 different cubes. For example creating a boolean or integer or float is just that, and for classes it must be linked to a BP.

I’m not sure I understand. But if you in your struct create an array of “actor class reference”, you should be able to set the default content of that array to any blueprint actors you’ve made.

I finally managed to make it work. For anyone struggling with something simillar here’s what the BP looks like.


And thank you @sportbil