Duplicating actors into a cube or a cylinder
Input box and slider will affect each other, Reset button will reset to default
Construct event
text to slider bar, If input is larger than default value set the larger value as maximum value
slider bar to text, Changing the input box value in real time
Reset button, a button that resets the slider to default value.
Overview of Slider blueprint
It has two modes circle mode and square mode, one will make a matrix and the other one makes a tube
Layout of the UI widget
Using For loop on XYZ to create Matrix, Multiply for loop index to Adjust the space
The entire Matrix duplication spawn logic
Final result
You can adjust the radius, height and direction for the circle duplication
Set up the circle center Based on the selected actor, Think of this like a invisible actor, I am responding more actors around this hypothetical point
Two layers of for loop once for Determines the radius the other one Determines the height
Changing the spawn angles and location based on the direction you choose
The entire circle duplication spawn logic
Final result
Getting the target actor and deleting the old duplicate actor after new apply
Applying the final calculation and duplicate actors
The final Blueprint
Environment: Unreal Engine Starter Content