Dynamic UMG elements in Blueprints

Hello,

is it possible to dynamically create UMG elements with BP’s?

Because I have a BP Actor Component where I can set a variable (Integer) and based on this variable an UMG Widget should create Images.

Example

BP Actor Component
MyVar = 5

UMG Widget
5 * Images

Hello,
Here is an example (you can find more by searching docs, forum, answerhub and others about dynamic umg spawning : How can i add buttons dynamically on my UMG Widget? - UI - Unreal Engine Forums . In your case, you replace the inventory items / for each loop by a your value / loop.

Thank you Fen!

If you do not find the answer there, what you could do is use the Tick in the Widget, get all actors of class > Get node > Cast to Actor BP > Get Variable

From there create a branch or several branches that checks to see if the variable is = to whatever number. If it is, then it calls a function to change the image to whatever. If not then it proceeds to the next number to check.

Hope you find the answer you seek.