# Health Bar not Showing in Viewport

**URL:** <https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746>\
**Category:** C++\
**Tags:** health-bar, unreal-engine, UI, Widget, UMG\
**Created:** [March 7, 2022, 3:20pm UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746 "2022-03-07T15:20:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![top\_game\_makers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@top\_game\_makers](https://forums.unrealengine.com/u/top_game_makers)\
**Post date:** [March 7, 2022, 3:20pm UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746/1 "2022-03-07T15:20:56Z")

</div>

![umg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/6/0c6c908f06e247c9d822e4daf8132ede9a050e69.png)  
 ![umgg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/c/b6c9830271bae0adb12ae3329ecc4b1b7fc7a695.png)  
 ![umgg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/c/b6c9830271bae0adb12ae3329ecc4b1b7fc7a695.png)  
 ![umg2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/b/d0b3eedc20e332c7c92f6493b825956b39afb607.png)  
 ![umg1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/0/400003ffb52db2942197a040f8843fa87b1429d2.png)  
 ![umg3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/9/a69fb48dfc1ba507478fbebf76fcb1473e94f7db.jpeg)

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [March 7, 2022, 4:48pm UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746/2 "2022-03-07T16:48:55Z")

</div>

Hi, I don’t see that you create the widget and add it to viewport. You could look at the second code example of the first post here [[TUTORIAL/SNIPPET] Creating a UMG Widget in C++, and delegate example](https://forums.unrealengine.com/t/tutorial-snippet-creating-a-umg-widget-in-c-and-delegate-example/15903)

---

<div class="post-metadata">

**Author:** ![top\_game\_makers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@top\_game\_makers](https://forums.unrealengine.com/u/top_game_makers)\
**Post date:** [March 7, 2022, 5:25pm UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746/3 "2022-03-07T17:25:20Z")

</div>

As you Can Comepare here In Same Project File But Which has Different Levels.  
Why? Health Bar is Showing in NewLevel But Not in (SunTemplel) Level??  
Any way To Fix it

 ![Screenshot 2022-03-08 230539](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/c/2aceac1aeff07b0af7134c6bdcde2ca4a39b324e.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/a/c1ae0020c47af8e541f1455a51ad424b682a2636.jpeg)

---

<div class="post-metadata">

**Author:** ![eblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eblade](https://forums.unrealengine.com/u/eblade)\
**Post date:** [March 8, 2022, 1:39pm UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746/4 "2022-03-08T13:39:40Z")

</div>

My first guess, without knowing anything else about your project, is that probably the working level’s Game Mode is set to your custom game mode that sets everything up, but the Default Game Mode for the entire game is not set to that.

---

<div class="post-metadata">

**Author:** ![top\_game\_makers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@top\_game\_makers](https://forums.unrealengine.com/u/top_game_makers)\
**Post date:** [March 9, 2022, 3:46am UTC](https://forums.unrealengine.com/t/health-bar-not-showing-in-viewport/504746/5 "2022-03-09T03:46:36Z")

</div>

thanks
