# Switch a widget with a different widget and change the widget switcher

**URL:** <https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905>\
**Category:** UI\
**Tags:** integer, unreal-engine, menu, Widget, question\
**Created:** [November 23, 2020, 2:50pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905 "2020-11-23T14:50:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 2:50pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/1 "2020-11-23T14:50:03Z")

</div>

I’m trying tio make a menu with 3 widgets, one if for the main menu and the second is for the ingame menu + the options menu and us e a Widget Switcher on the ingame menu using an integer and one for a custom FPS counter.

UI\_Main 2 is the Widget Blueprint that don’t work.

Int WS 0 = Ingame Menu

Int WS 1 = Options Menu

Int WS 2 = Quit Game

The problem is that the integer start on 1, not on 0 and can’t start on 0. If I set it to 0 will Unreal Engine set it to 1.  
Here are some screenshots:

link to project:

> **[Meet Google Drive – One place for all your files](https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https:%2F%2Fdrive.google.com%2Ffile%2Fd%2F130zJz9P0UX0XWaeirx_56TGvhWS_qc6r%2Fview?usp%3Dsharing&followup=https:%2F%2Fdrive.google.com%2Ffile%2Fd%2F130zJz9P0UX0XWaeirx_56TGvhWS_qc6r%2Fview?usp%3Dsharing)**
>
> Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.

 ![322860-0001.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/a/cfaafdb03fe7d2127acaa378759de3900684c143.png)

 ![322871-0002.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/4/4f475e985d74a7e999ce9be3c99fcf8293efbc24.png)

 ![322872-0003.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/2/8c21154a1bb261541894553cc66abbec74331073.png)

![322873-0004.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/5/4e573320e84f614ea72a0fd66dd23468fb14dfaa.png)

 ![322874-0005.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/1/5a16fde65de63186ca8a6e2d0d2545ef279742ae.png)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [November 23, 2020, 2:56pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/2 "2020-11-23T14:56:57Z")

</div>

Hi, there! Can you share public access to google drive files? They are closed at the moment )

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 3:01pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/3 "2020-11-23T15:01:00Z")

</div>

here:

> **[Meet Google Drive – One place for all your files](https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https:%2F%2Fdrive.google.com%2Ffile%2Fd%2F130zJz9P0UX0XWaeirx_56TGvhWS_qc6r%2Fview?usp%3Dsharing&followup=https:%2F%2Fdrive.google.com%2Ffile%2Fd%2F130zJz9P0UX0XWaeirx_56TGvhWS_qc6r%2Fview?usp%3Dsharing)**
>
> Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [November 23, 2020, 3:51pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/4 "2020-11-23T15:51:58Z")

</div>

Just start checking that. Why do you use DoOnce in Tick instead of BeginPlay or Construct? The problem is not with WidgetSwitcher, smth wrong is in the logic under Tick.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 23, 2020, 3:55pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/5 "2020-11-23T15:55:36Z")

</div>

> The problem is that the integer start  
> on 1, not on 0 and can’t start on 0.  
> If I set it to 0 will Unreal Engine  
> set it to 1.

But that’s not true…

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 3:59pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/6 "2020-11-23T15:59:47Z")

</div>

Sometimes does BeginPlay and Construct bug out and won’t work for me

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 4:02pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/7 "2020-11-23T16:02:44Z")

</div>

So how do I set it to 0?

this codes set it to 1:

 ![322868-0008.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/4/804db40d93673e7ade811a5d9c96138e98cdf8d6.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 23, 2020, 4:03pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/8 "2020-11-23T16:03:39Z")

</div>

You overwrite it somewhere. Also this sets it twice. Print after settings or use debug to watch the value.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [November 23, 2020, 4:07pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/9 "2020-11-23T16:07:42Z")

</div>

It is rather bad practice to implement smth in Tick just to fire it only once. And I am sure that the error is pictured. You are using macro defenition, but as I see, this macro is setting Switcher Index to 1.

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 4:16pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/10 "2020-11-23T16:16:32Z")

</div>

thank you for the, it is resolved now

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 4:17pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/11 "2020-11-23T16:17:17Z")

</div>

Thank you for the help, that did resolve my problem.

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [November 23, 2020, 4:21pm UTC](https://forums.unrealengine.com/t/switch-a-widget-with-a-different-widget-and-change-the-widget-switcher/474905/12 "2020-11-23T16:21:36Z")

</div>

It is resolved
