Seeking Assistance: Dynamic Material in Widget Not Updating

Hello, this is my first post ever, so bear with me. I have put a dynamic material on a reticle widget, intending to show time on shooting-related powerups decreasing. The dynamic material seems to work initially, for when I set the percentage parameter, the reticle displays with the proper percentage. But when I actually update it per tick, though debug shows me the value changing, the reticle does not change. Here is an image of the appropriate script section. The top path (initial setting) works. The bottom (updating a changing value per tick) does nothing that I can see. It shouldn’t be a parameter name problem, as I’m setting it with the same (unchanging) variable.

Hopefully the image shall come through as I’m new to this.

If there’s a way to post video, I also could, showing the reticle changing when set manually via the top path but failing to update when being set programmatically on the bottom.

Thank you!

Resolved, by me. It was something weird but dumb. Apparently I had TWO widgets of this class, one attached to the player and one created in runtime. I finally noticed this when one branch of debug (the initialize one) hit breakpoints twice but every other place only hit them once.

The widget attached to the player was hidden inside his fat, spherical body. The runtime one was the one actually on the Viewport. When I ran debug, it returned all the wonderful data from the hidden one, thus imitating a nice, functioning Widget getting good data (which it was), since that was the one I was calling (having forgotten about the runtime one created weeks ago), while the poor, forgotten, uncalled widget I COULD ACTUALLY SEE did nothing. Because I was telling it to do nothing.

I’m a dope.
Thanks for listening.

1 Like