How to access widget bp variables into class bp?

I have declared widget blueprint variables as public also i have done function binding but am still unable to access them in class blueprint.

You still need to get a reference to the widget:

In any event. If you want to have those variables in a class BP, then actually put them in the BP, and bind from the widget to the class.

Can you tell what have i been doing wrong clockwork, I am trying to set data for the widget variables but can’t seem to find a way to display them. I have binded speakername and speakertext to sname and stext respectively.

Even the first node i connected shows variable out of scope. I just want to display some text in the widget. I am trying to do this by binding a variable in widget and trying to set it in class BP that’s the photo which i attached.

Yes, but you’re binding the widget to a variable in the widget. You need to bind the widget to stuff in your BP that’s controlling the sound and text :slight_smile:

EDIT: So, totally ficticious example, but let’s say my BP brings up the next bit of audio and text like this:

So it’s playing the audio and has set ‘current text’ to the text that goes with the audio. In my widget, I just have:

So the widget always shows the right text :slight_smile:

So i changed my BP, but i can’t seem to find the function you used in binding the widget to the BP. I have [get all actor of class]. Also can you check whether my BP to display a text is correct.

Thanks a ton man! It got sorted out :slight_smile:

You didn’t connect up the second node:

304462-set.jpg

EDIT: Like I say, binding from the widget to the BP is the usual way to do it, then you don’t have to keep reaching into the widget to change things. If you want to know how to do that, just show a bit of your BP where you are choosing and playing text and audio…

It looks ok. So you have to bind to St.

I think you’re using an older version of the engine.

304463-actor.jpg

is just a more convient way of doing:

304464-actors.jpg

Because a lot of the time we know we only have one.