Getting 2 different UMG blueprints to talk to each other.
Hello! I've been trying to figure out how to get two different Widgets to talk to each other. Lets call one General UI and the other Total. When i press buttons in the General UI i want the number on Total to change accordingly, as an example add or subtract from it, but for the life of me i can't get those 2 to talk to each other. I have tried with BP Interfaces, even event dispatchers and creating just custom events. So if anyone could give me a hint or point me in the right direction that would be much appreciated!
asked May 06 '16 at 12:39 PM in Blueprint Scripting
With a reference to the other one, public functions and variables can be accessed. So, store a reference to one after it is made. If it's just a Widget Reference you'll need to cast it.
However, I think a much better solution is not to require UMG Wdigets to access each other. Instead save your variables in a GameMode, GameState, GameInstance, or PlayerController even, create a binding to the Widget element that gets the needed value from that.
answered May 06 '16 at 01:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here