I run into an issue where the dialogs are always appearing on top.
Even if I set the sort order of my pause menu to extreme high numbers into the thousands.
The dialog system still appearing on top with a sort order of 100.
I would like to show my pause menu on top the dialog.
my pause menu using UI Toolkit not canvas, but that should not mater
Could you help me please?
Sort Order not respected with UI Toolkit
Re: Sort Order not respected with UI Toolkit
Hi,
There's nothing specific to the Dialogue System. Is the Canvas that contains your dialogue UI a Screen Space - Overlay canvas? Its default sort order should be 0, not 100, although you're free to change it.
Are you using Unity 2021.2 or higher? Sort order compatibility between the two UI systems was added in 2021.2.
There's nothing specific to the Dialogue System. Is the Canvas that contains your dialogue UI a Screen Space - Overlay canvas? Its default sort order should be 0, not 100, although you're free to change it.
Are you using Unity 2021.2 or higher? Sort order compatibility between the two UI systems was added in 2021.2.
Re: Sort Order not respected with UI Toolkit
I'm on 2022.3.16
I have changed the sort order of the Dialog Manager canvas to 10 now the pause Menu (sort order 50) is over it. which is correct.
But the animal selector which is also UI Toolkit with sort order 0 appears over it now.
I'm using Screen Space - Overlay for the dialog.
It is weird. I guess it is not a dialogue system but a Unity issue.
Maybe I just move the dialog system out of screen while the Pause menu is open.
Or maybe it is possible to hide it without loosing it state (as it is paused)
I have changed the sort order of the Dialog Manager canvas to 10 now the pause Menu (sort order 50) is over it. which is correct.
But the animal selector which is also UI Toolkit with sort order 0 appears over it now.
I'm using Screen Space - Overlay for the dialog.
It is weird. I guess it is not a dialogue system but a Unity issue.
Maybe I just move the dialog system out of screen while the Pause menu is open.
Or maybe it is possible to hide it without loosing it state (as it is paused)
Re: Sort Order not respected with UI Toolkit
Hi,
The easiest way to reliably hide it without losing its state is to disable its Canvas. Example:
Then enable it again when you close the pause menu.
The easiest way to reliably hide it without losing its state is to disable its Canvas. Example:
Code: Select all
DialogueManager.displaySettings.defaultCanvas.enabled = false;
Re: Sort Order not respected with UI Toolkit
Thank You Tony! That actually works very well and looks better than if I overlay it! Awesome!
Re: Sort Order not respected with UI Toolkit
Glad to help!