Cant access Text Widget in BP

I think I lack a basic understanding of how to update UI Widgets. I call the custom Rrepresent function to update the text of the Text Widget from “Name” to “Moooo”, it does not update though and the error log shows “Accessed None trying to read property NameText”. The Name Text Widget is set to variable though, I dont know how the access could fail. Any help? Would be really grateful :slight_smile:

From what I can see in the images you’ll want to click “Bind” to the right side of the Text value, and create a new binding. Then it should create a new function, from there you can create a new text variable and plug it into the return node. After that you should be able to access that variable at runtime and set it to be whatever you’d like the text to say.

Aside from that you’ll have to upload some more screenshots of the code in order for me to help you out a bit more, looking at the first screenshot it seems like the “Self” node also could be an issue since you shouldn’t have to use Self when getting a variable in the widget blueprint.

You don’t need the self reference. If the NameText is a variable then you should be able to drag it from the variables list onto the blueprint. Drag off that to SetText and that’s it.

Yeah, i’m having the same problem. It’s really strange …

I made a new TextBlock and set “Is Variable” and when i try to SetText in Blueprint I get the message “Accessed None trying to read property txtItemName”.

EDIT: Nevermind … restarting Unreal Editor fixed it.