I have a Widget Blueprint which has to appear on the screen in some circumstances.
Now the problem is: how do I access the Widget (and so, its variables) in my C++ code?
But the problem is that I have a **UserWidget pointer, **and this means I can’t access the Widget Blueprint variables
What I need is a **reference to the ****instance of the Widget Blueprint **in my C++ code, so that I can access its variables/functions.
I have to, in some way, link the Blueprint class to C++
------------------- my (failed) attempt -------------------
I already tried making a GameMode Blueprint like this
I saved the reference in the GameMode because **I always need that reference, even when the Level changes: it’s a “game constant”
But the problem arises again**
I need a way to link the GameMode Blueprint to C++ in order to use that reference
It’s always the same story.
**What can I do? **
Thanks in advance