# How to display a Variable definde inside MyPlayer in UMG UI

**URL:** <https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [February 1, 2015, 11:27am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061 "2015-02-01T11:27:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 11:27am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/1 "2015-02-01T11:27:16Z")

</div>

Hi  
I have a very basic problem with displaying a custom variable defined in My Player in a umg UI Widget. I have done everything like they do in this tutorial [UMG UI Designer Quick Start Guide | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/index.html) with the current\_ammo. With current\_ammo it works but with my custom variable assigned to an other text element noting is displayed. Any idea what i may have been missing? Could anybody please point out how to display a variable in the UI, it can’t be so hard i believe;)

---

<div class="post-metadata">

**Author:** ![Fen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fen/32/635651_2.png) [@Fen](https://forums.unrealengine.com/u/Fen)\
**Post date:** [February 1, 2015, 11:34am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/2 "2015-02-01T11:34:02Z")

</div>

Hello,  
The two things i would check first is if a part of the widget is hidden (text itself or box or wrapped. Then i would print string variable in character to see if it is ok. In case of this not solve your issue, please, add a pic of both character and umg, then we can try to help you to find where is the trouble.

---

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 11:55am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/3 "2015-02-01T11:55:26Z")

</div>

Thank you for the quick reply. I have found a solution. I have put my textblock inside a box element and now it is displaying my variable. I m not sure why? Do you have an idea?

---

<div class="post-metadata">

**Author:** ![Fen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fen/32/635651_2.png) [@Fen](https://forums.unrealengine.com/u/Fen)\
**Post date:** [February 1, 2015, 11:59am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/4 "2015-02-01T11:59:44Z")

</div>

Without a look at bp, no idea 😛 but eh it works ! grtz

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [February 1, 2015, 11:59am UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/5 "2015-02-01T11:59:48Z")

</div>

If on my screen, this is my binding to get data from character

![3638fdbe885af981f844059cc3e7061bd5a04832.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/3/3638fdbe885af981f844059cc3e7061bd5a04832.jpeg)

 ![2decb2c68a004809f39072f61e1ac7548238d80a.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/e/2decb2c68a004809f39072f61e1ac7548238d80a.jpeg)

![c7e502190680aefd8874eaf0f5221da14d07d399.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/e/c7e502190680aefd8874eaf0f5221da14d07d399.jpeg)

If I spawn a 3D widget, i use this. the widget is 4 sided, so copied 3 more times. these are collapsed nodes so ignore input and output. Sorry about graphics with ingame.

 ![43ab266351b8290d59ae8e13ff21dd39101ce43a.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/a/43ab266351b8290d59ae8e13ff21dd39101ce43a.jpeg)

 ![f07e0ec9b6e0b40711d22552ea8105c54189b018.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/7/f07e0ec9b6e0b40711d22552ea8105c54189b018.jpeg)

![8faae6a1dc81fb542a50eb1517c0b1fcef15b088.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/a/8faae6a1dc81fb542a50eb1517c0b1fcef15b088.jpeg)

---

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 12:00pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/6 "2015-02-01T12:00:57Z")

</div>

it is looking like the element wasnt on the screen, i might have a look at how positioning elements in umg works;)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [February 1, 2015, 12:01pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/7 "2015-02-01T12:01:45Z")

</div>

Remember to anchor

---

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 12:12pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/8 "2015-02-01T12:12:18Z")

</div>

I have re-sized my gameview during play and in fact the textblox that wasnt in a horizontal box(the red marked) was out of the screen;) the blue marked was displayd as expected.

 ![umg.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/7/4072953bfce50f9efca13ecbcf7b72e6a800eff7.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [February 1, 2015, 12:19pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/9 "2015-02-01T12:19:44Z")

</div>

Did you anchor? Original Widgets unless custom is 100x100, select custom.

![fefaf579353cda2eefa09141b328ccc0d6858393.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/f/fefaf579353cda2eefa09141b328ccc0d6858393.jpeg)

But when you call a widget, it defaults to 500x500.

![c36ca7b80b99c3b646ffb1cd62616a7ccd2ff62a.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/6/c36ca7b80b99c3b646ffb1cd62616a7ccd2ff62a.jpeg)

EDIT: It does not have to be in a Horizontal Box, I do not use them

---

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 12:51pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/10 "2015-02-01T12:51:01Z")

</div>

Thank you very much. The strange thing is that in an other project where i want to do the same, the text still disappears as soon as i add a binding, without binding the text is displayed. Dose Text Bindings have an influence on the position?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [February 1, 2015, 1:28pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/11 "2015-02-01T13:28:46Z")

</div>

The reference to the screen size.

Can you do me a favour. Open your widget and click on custom. Check the widget size.

---

<div class="post-metadata">

**Author:** ![GameChanger23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameChanger23](https://forums.unrealengine.com/u/GameChanger23)\
**Post date:** [February 1, 2015, 4:50pm UTC](https://forums.unrealengine.com/t/how-to-display-a-variable-definde-inside-myplayer-in-umg-ui/20061/12 "2015-02-01T16:50:01Z")

</div>

the widget size was in fact to smal, Thank you. But in the other Project i just used the wrong reference, player character instead of player controller(the variable is in player controller in this project, because im using kind of a free camera without a character) 😉 but anyway thank you very much!
