Text widget shows up in editor/asset preview but not in game

Hi, I hope you guys can help me because I dont know what I’m supposed to do at the moment. Worse thing is, I got it working before but my UE5 crashed and I had to do some parts of it again.
I’m trying to display simple name plates above my items after my capsule trace hits them. Problem is, that I can see the text appearing in the editor and asset preview window (look at the screenshots) but they’re not visible when I test the game. I tried turning everything on “visible” and even ignore the capsule trace but no luck. At this point I dont even know what the problem seems to be.

textui.jpg

Is it printing NAME?

Yes it is

And I’m assuming DisplayNameplate just does a SetVisibility?

Then, no idea I’m afraid…

Yes, its just setting the visibilty.

It could be a couple things that might be wrong… including the dimensions of your actual widget that you are using to display the name, and the draw size you may have defined; a lot of times your widget contents get clipped. Also, tell us what you’re using, draw in world or draw on screen in the settings?

I would also propose rotating just in case it’s visible on the other side? Tho you do say ‘two-sided’ in your settings, but you never know…

I solved the problem. It laid within the function that I made to define the contents of the value of the text block. I forgot to cast to my widget and use “get user widget object” in that function.
Heres the correct code: