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

**URL:** <https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376>\
**Category:** UI\
**Tags:** text-box, unreal-engine, UI, Blueprint, question\
**Created:** [November 27, 2021, 10:03am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376 "2021-11-27T10:03:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stadtwache](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stadtwache](https://forums.unrealengine.com/u/Stadtwache)\
**Post date:** [November 27, 2021, 10:03am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/1 "2021-11-27T10:03:40Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/0/d0796a4274486a8380f5e4a82c512fc4cc415e55.jpeg)

 ![nameplates.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/2/5250f58a4e6d79fe6d0b742197a68c80ced27ecb.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 27, 2021, 10:51am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/2 "2021-11-27T10:51:16Z")

</div>

Is it printing NAME?

---

<div class="post-metadata">

**Author:** ![Stadtwache](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stadtwache](https://forums.unrealengine.com/u/Stadtwache)\
**Post date:** [November 27, 2021, 10:52am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/3 "2021-11-27T10:52:23Z")

</div>

Yes it is

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 27, 2021, 10:59am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/4 "2021-11-27T10:59:22Z")

</div>

And I’m assuming DisplayNameplate just does a SetVisibility?

Then, no idea I’m afraid…

---

<div class="post-metadata">

**Author:** ![Stadtwache](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stadtwache](https://forums.unrealengine.com/u/Stadtwache)\
**Post date:** [November 27, 2021, 11:23am UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/5 "2021-11-27T11:23:33Z")

</div>

Yes, its just setting the visibilty.

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 27, 2021, 6:18pm UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/6 "2021-11-27T18:18:54Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Stadtwache](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stadtwache](https://forums.unrealengine.com/u/Stadtwache)\
**Post date:** [November 27, 2021, 11:05pm UTC](https://forums.unrealengine.com/t/text-widget-shows-up-in-editor-asset-preview-but-not-in-game/491376/7 "2021-11-27T23:05:00Z")

</div>

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:

 ![353176-richtiger-code.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/3/db35128092ab45060b3924dc1111d05ccf496510.jpeg)
