It depends what you are trying to keep updated. Your code looks good here, but what exactly are you trying to update in your HUD? Is it a picture, visibility, an array of objects? I haven’t done updating for an entire inventory so I may not be able to help there. However, I would take a look at property binding here Property Binding for UMG in Unreal Engine | Unreal Engine 5.1 Documentation . You can use that to keep a widget constantly updated to whatever a variable is set to, whether that’s an image, score, life, etc. After reading that and getting a feel for it I would instead create functions that do something similar and update your widgets whenever you call the function. For example, in the details section of a part of your widget (lets say the score), you can promote that part of the widget to a variable. Then, after you update your score variable, call a function UpdateScore that sets the widget variable to the score variable. Using the property binding method is quick and easy by comparison, but it will constantly call the function which will probably be a waste of memory unless that variable is constantly changing.
Basically: promote a component of your widget to a variable. Make a function to set that variable to whatever other relevant variable you want, whenever that one is updated.
I hope this helps and makes sense!