Could you post the code that shows how you get the struct from the bp for the widget?
No problem, happy to help. Answer below.
You’re only updating the struct for the first widget that exists in the list of all
Counter objects. With your
Get(0), you’re only getting the first widget.
You should create a reference in the building to the
Counter, so you can reference it directly.
Or you should use a generic object with properties instead of a struct. That way when you update the
info container, it will update everywhere. Including your widget which will have a reference to that same info variable.
Glad it worked!
Well hello again!
Here is my question:
i have actually a struct for manage several variables buildings or actors; in each building i have the same widget showing the diferent names and numbers (comming from the variables inside the struct) but when i try to change the integer inside of each building or actor it changes globally at all the buildings who shares the same widget / struct.
Am stuck at this point. Please help me… am a good human being
Sure! and thank you Ben for your early answer!
This is my scene:
And this is how looks inside those actors
Then this is the functions that refresh the widget counter
and this is the text inside the widget
So… my widget is incrementing the integer inside the variable… but is doing for all actors… and showing the increment just in one single actor
maybe is a silly mistake but am really stuck right now
Thank you again!
ohhh i see… as i said… a silly mistake. But i tried using a generic object, i guess am too newbie. It’s not distributing correctly. Can i send you the proyect? is a very (very) small proyect. that would be great Ben. (sorry!)
I have tried referencing directly too and nothing
It worked! thank you very much Ben!!!