# Moving from 5.1 to 5.3  AddToViewport not honoring ZOrder

**URL:** <https://forums.unrealengine.com/t/moving-from-5-1-to-5-3-addtoviewport-not-honoring-zorder/1275972>\
**Category:** UI\
**Tags:** unreal-engine, question\
**Created:** [August 29, 2023, 1:08am UTC](https://forums.unrealengine.com/t/moving-from-5-1-to-5-3-addtoviewport-not-honoring-zorder/1275972 "2023-08-29T01:08:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMBarth1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JMBarth1](https://forums.unrealengine.com/u/JMBarth1)\
**Post date:** [August 29, 2023, 1:08am UTC](https://forums.unrealengine.com/t/moving-from-5-1-to-5-3-addtoviewport-not-honoring-zorder/1275972/1 "2023-08-29T01:08:49Z")

</div>

Our studio just upgraded from 5.1 to 5.3. We have layerd menus added to the viewport using pMyMenu-\>AddtoViewport(iZorder). It seems that the zorder is no longer being honored and my foreground menu is now behind my main menu. Is this a bug in 5.3?

---

<div class="post-metadata">

**Author:** ![Shmoopy1701](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shmoopy1701/32/1194536_2.png) [@Shmoopy1701](https://forums.unrealengine.com/u/Shmoopy1701)\
**Post date:** [August 29, 2023, 2:36am UTC](https://forums.unrealengine.com/t/moving-from-5-1-to-5-3-addtoviewport-not-honoring-zorder/1275972/2 "2023-08-29T02:36:23Z")

</div>

I think this issue has been around for a while, because even our HUD code from years ago is adding HUD elements to view in their relative Z Order.

---

<div class="post-metadata">

**Author:** ![JMBarth1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JMBarth1](https://forums.unrealengine.com/u/JMBarth1)\
**Post date:** [August 30, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/moving-from-5-1-to-5-3-addtoviewport-not-honoring-zorder/1275972/3 "2023-08-30T15:13:34Z")

</div>

In 5.1 I’ve had no problem adding menus to viewport and having them honor Zorder. In 5.3 the zorder is no longer being honored and the menus are overlapping in order of addition.
