Download

Seriously, when two widgets are created

When I call the variable of the other widget, it doesn’t work sometimes.

Does anybody know this mystery?

Ex) I’ve made Main Widget and Drop Widget.

When “Drop?” Variable is checked in the drop widget, a function of the main widget should be operated.

But as I checked by nailing print string nodes to find out the error, always this calling variables of the other functions is the place where I get stuck.

did you check if all references are valid before trying to access them?

Hello,

It’s possible I’m not understanding what you are doing, but setting a variable does not trigger any code execution, it just sets the variable. That’s it!

Here I set a member variable of an other blueprint, the “SomeEvent” could be when you press a button in a UMG widget.

And here I’m trying to execute “Do a thing” or “Do another thing” when “Should Do Something?” changes. But this will NOT work! The branch will not be automatically executed when the variable changes. The code in the picture below will ONLY execute when the event “SomeOtherEvent” is called.

To fix this, you could call “SomeOtherEvent” after setting the variable.

Or change things a little:


and

Here I used events, but it could be functions too.