Widget Variable Reference Issue

Hello!

I’m attempting to reference variables stored in a widget blueprint. I created a variable that references the other widget, but the variables in that widget aren’t being sent - and the branch always returns false.

Any help is much appreciated!

Is “Player Reference” your reference to your other widget?

If so, then can you show how you are setting the value of Player Reference?

Where do you set the value of “Player Reference”? If you are just leaving it null, then that’s your problem.

Yes, “player reference” is the other widget. Not sure what you mean by setting the value.

I don’t believe I set a value for “player reference”. Would you mind explaining how I would do that?

Assuming the other widget is the only one of its kind and it already exists, then you could just do something like this:

Looks like that did the trick - thanks so much! So all this is doing is casting variables stored in the “player” widget?

Get All Widgets of Class returns an array of references to all widgets of a certain class. Since you only have one of those widgets, only element 0 of the array will be populated. You’re just grabbing that reference and giving it to your reference variable so it can use it.

Don’t forget to click the little check mark next to this answer to mark the issue resolved so others know.