I am trying to show different messages with some buttons at the same screen location in a given scene. These messages are created on top of the Base layer at the same location and depending on my requirement I show/hide them. Something like a popup/transparent box on top of Base layer with text/buttons. This way only the message content/actions will change, not its coordinates or background.
- Message 1 and Message 2 are in the same layer and position.
- Some Action 1: Message 1 is shown and its related buttons/actions activated. Message 2 is hidden and its related buttons/actions deactivated.
- Some Action 2: Message 2 is shown and its related buttons/actions activated. Message 1 is hidden and its related buttons/actions deactivated.
I tried to achieve this by creating both messages/buttons at the same coordinates on the same layer and showing/hidding them as appropriate. However, due to the Z index of the messages and buttons, the whole setup is extremely messy. I tried Deleting messages/actions that are not required, but this will remove the message completely for the next time it is triggered.
I can create different scenes for each message/actions, but that will require user to unnecessary navigate away from the game scene. I would like to show different messages on the top of the Base Scene at different times.
Any better suggestions to achieve my goals?