"Actor" containor class - live change in level editor


This question is a pain in my side since i started UE4 development

I have 2 Actor classes. Ball and BallContainer

Ball holds a static mesh. For simplicity, Ball holds a circle “O”

BallContainer holds an array of Ball called “Balls” and arranges them in different ways. This class only has an int input “num”.

If num == 1 we see O

if num == 3 we see O

if num == 5 we see O

As you can see, since the BallContainer only has an int input, it has to:
1 - initialize/spawn “num” Ball instances and add them to the “Balls” array
2 - add them to the root component
3 - loop over Balls and moves the contained Ball instances to the appropriate location relative to the root

now I want to visualize the change inside the level editor live. I don’t want to only be to see it after the game starts.

In short i want to create the equivalent of the Stairs Brush, you can add steps instantly by just changing the “num steps” slider in the editor.

I tried doing this in the construction script, but it is not practical not recommended.

Please help me. I am a programmer and i normally do this in a class constructor (Java)