Dialogue/AC Prefab Menu sort order problem.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Dialogue/AC Prefab Menu sort order problem.
Good day, everyone!
In today's progress blockade, My save menu isn't responding to mouse clicks when the dialogue window is open, even
though the save menu has a higher sort order. The save menu is a prefab that's used by Adventure Creator. It does not
pause itself during dialogues or cutscenes.
Here are the screen shots of the dialogue manager and save menu:
https://www.mediafire.com/view/uzvmbul2 ... 0.png/file
https://www.mediafire.com/view/ii7keimk ... 0.png/file
https://www.mediafire.com/view/4rb5rirt ... 0.png/file
Now, the reason the dialogue panel is drawing over the save slots is that those images are actually sprites separate from the
save menu object. They have a lower draw order than the menu's buttons (which are invisible), so they don't interfere with the menu's functionality. This has to seem superfluous, but Old Moat Games' Animated gif player doesn't work on Unity UI
prefabs. They work on in-scene UI's so I'll just fix that later.
https://www.mediafire.com/view/rxismau8 ... 0.png/file
As always, thank you for any advice anybody has to offer!
In today's progress blockade, My save menu isn't responding to mouse clicks when the dialogue window is open, even
though the save menu has a higher sort order. The save menu is a prefab that's used by Adventure Creator. It does not
pause itself during dialogues or cutscenes.
Here are the screen shots of the dialogue manager and save menu:
https://www.mediafire.com/view/uzvmbul2 ... 0.png/file
https://www.mediafire.com/view/ii7keimk ... 0.png/file
https://www.mediafire.com/view/4rb5rirt ... 0.png/file
Now, the reason the dialogue panel is drawing over the save slots is that those images are actually sprites separate from the
save menu object. They have a lower draw order than the menu's buttons (which are invisible), so they don't interfere with the menu's functionality. This has to seem superfluous, but Old Moat Games' Animated gif player doesn't work on Unity UI
prefabs. They work on in-scene UI's so I'll just fix that later.
https://www.mediafire.com/view/rxismau8 ... 0.png/file
As always, thank you for any advice anybody has to offer!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Dialogue/AC Prefab Menu sort order problem.
Hi!
Also, while the dialogue UI is up, check the SaveMenu's Canvas. Does it have an enabled GraphicRaycaster component? This component is what does the mouse raycasting for each canvas.
Keep an Inspector view on the EventSystem GameObject. During play, it will show what's currently selected and what it detects under the mouse cursor. It might give you a clue about what's blocking mouse cursor selection (aka mouse raycasting).CodePrincess wrote: ↑Mon Sep 07, 2020 4:31 pmMy save menu isn't responding to mouse clicks when the dialogue window is open, even though the save menu has a higher sort order. The save menu is a prefab that's used by Adventure Creator. It does not pause itself during dialogues or cutscenes.
Also, while the dialogue UI is up, check the SaveMenu's Canvas. Does it have an enabled GraphicRaycaster component? This component is what does the mouse raycasting for each canvas.
Are they perhaps on a higher sprite layer than the UI, even if their sort order numbers are lower?CodePrincess wrote: ↑Mon Sep 07, 2020 4:31 pmNow, the reason the dialogue panel is drawing over the save slots is that those images are actually sprites separate from the save menu object.
Maybe they don't like to be instantiated from a prefab? Or they don't like to be deactivated? (AC instantiates all menus, then deactivates them until they're needed.) If the GIF player runs in a coroutine, the coroutine might stop whenever the GameObject is deactivated -- or, more accurately, when the GIF player component is disabled as part of the GameObject deactivation process. If this is the case, contact the developer to get them to update the script so it restarts the coroutine when the component is re-enabled.CodePrincess wrote: ↑Mon Sep 07, 2020 4:31 pmThis has to seem superfluous, but Old Moat Games' Animated gif player doesn't work on Unity UI prefabs. They work on in-scene UI's so I'll just fix that later.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Dialogue/AC Prefab Menu sort order problem.
Like this?Keep an Inspector view on the EventSystem GameObject. During play, it will show what's currently selected and what it detects under the mouse cursor. It might give you a clue about what's blocking mouse cursor selection (aka mouse raycasting).
https://www.mediafire.com/view/ns88ydmt ... 0.png/file
It doesn't seem to respond to any of my actions.
The GraphicRayCaster is active:Also, while the dialogue UI is up, check the SaveMenu's Canvas. Does it have an enabled GraphicRaycaster component? This component is what does the mouse raycasting for each canvas.
https://www.mediafire.com/view/iqqk87sp ... 0.png/file
The save slot sprites are not part of a UI, and I don't know how to compare the layer orders of a sprite to the sort orderAre they perhaps on a higher sprite layer than the UI, even if their sort order numbers are lower?Now, the reason the dialogue panel is drawing over the save slots is that those images are actually sprites separate from the save menu object.
of images in an active UI's canvas.
How can I tell if the Gif player runs in a coroutine?If the GIF player runs in a coroutine, the coroutine might stop whenever the GameObject is deactivated -- or, more accurately, when the GIF player component is disabled as part of the GameObject deactivation process. If this is the case, contact the developer to get them to update the script so it restarts the coroutine when the component is re-enabled.
Wow, it's nice having someone help me down the long path to gittin' gud. Thanks, Tony!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Dialogue/AC Prefab Menu sort order problem.
Drag the "Event System" bar up from the bottom:CodePrincess wrote: ↑Mon Sep 07, 2020 6:32 pmLike this?Keep an Inspector view on the EventSystem GameObject. During play, it will show what's currently selected and what it detects under the mouse cursor. It might give you a clue about what's blocking mouse cursor selection (aka mouse raycasting).
https://www.mediafire.com/view/ns88ydmt ... 0.png/file
It doesn't seem to respond to any of my actions.
This only applies if the canvas is World Space. World Space canvases and Sprite Renderers both have a Sorting Layer dropdown.CodePrincess wrote: ↑Mon Sep 07, 2020 6:32 pmThe save slot sprites are not part of a UI, and I don't know how to compare the layer orders of a sprite to the sort orderAre they perhaps on a higher sprite layer than the UI, even if their sort order numbers are lower?Now, the reason the dialogue panel is drawing over the save slots is that those images are actually sprites separate from the save menu object.
of images in an active UI's canvas.
Another thought is if you're using a Screen Space - Camera canvas. In this case, make sure a camera is assigned to it.
Happy to help! (Well, except I'm not sure I'm being so helpful at the moment with the menu clicking issue. Feel free to send a repro project to tony (at) pixelcrushers.com if you'd like me to take a look.)CodePrincess wrote: ↑Mon Sep 07, 2020 6:32 pmHow can I tell if the Gif player runs in a coroutine?If the GIF player runs in a coroutine, the coroutine might stop whenever the GameObject is deactivated -- or, more accurately, when the GIF player component is disabled as part of the GameObject deactivation process. If this is the case, contact the developer to get them to update the script so it restarts the coroutine when the component is re-enabled.
Wow, it's nice having someone help me down the long path to gittin' gud. Thanks, Tony!
I just remembered that I have a license for that player. I checked, and it doesn't run a coroutine.
Are you playing the GIF in a Raw Image? The GIF player sends output to a Texture2D. Raw Images use Texture2Ds; Images use Sprites.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Dialogue/AC Prefab Menu sort order problem.
That's right. I tried using a Raw Image, and while it looks good on the Scene screen, it goes white at runtime.Are you playing the GIF in a Raw Image? The GIF player sends output to a Texture2D. Raw Images use Texture2Ds; Images use Sprites.
....Could I maybe send you my whole project? It's not super advanced. Will you be able to make the project work without theFeel free to send a repro project to tony (at) pixelcrushers.com if you'd like me to take a look.
Adventure Creator, Dialogue System, etc. in the export package?
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Dialogue/AC Prefab Menu sort order problem.
If possible, please zip up the entire Assets, Packages, and ProjectSettings folders. This way I'll be able to see everything as you see it.
If that's not possible, then yes, you can export a unitypackage containing only your content, and also zip up the Packages and Project Settings folders and send them along with the unitypackage. I can import the unitypackage into a project and import the Dialogue System and Adventure Creator locally here. If you choose this route, me know what version of Unity you're using.
Either way, please send it to tony (at) pixelcrushers.com, and provide the exact steps I should follow to see the problem.
If that's not possible, then yes, you can export a unitypackage containing only your content, and also zip up the Packages and Project Settings folders and send them along with the unitypackage. I can import the unitypackage into a project and import the Dialogue System and Adventure Creator locally here. If you choose this route, me know what version of Unity you're using.
Either way, please send it to tony (at) pixelcrushers.com, and provide the exact steps I should follow to see the problem.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Dialogue/AC Prefab Menu sort order problem.
I sent you the whole thing. It should be in your inbox now!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Dialogue/AC Prefab Menu sort order problem.
Thanks! I sent you a reply email with some follow-up questions.
Re: Dialogue/AC Prefab Menu sort order problem.
Hi,
Turns out it's not a Dialogue System-specific issue. Your TALK button runs an AC ActionListAsset named SceneMenu_Talk_OnClick. This ActionListAsset pauses gameplay. When gameplay is paused, it doesn't allow input to your save menu. You could replace the "Third Party: Dialogue System Conversation" action with some other action that also runs for a while (i.e., not instantaneous), and it would still have the same problem.
One solution is to set the SceneMenu_Talk_OnClick ActionListAsset's "When running:" dropdown to Run In Background.
Turns out it's not a Dialogue System-specific issue. Your TALK button runs an AC ActionListAsset named SceneMenu_Talk_OnClick. This ActionListAsset pauses gameplay. When gameplay is paused, it doesn't allow input to your save menu. You could replace the "Third Party: Dialogue System Conversation" action with some other action that also runs for a while (i.e., not instantaneous), and it would still have the same problem.
One solution is to set the SceneMenu_Talk_OnClick ActionListAsset's "When running:" dropdown to Run In Background.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Dialogue/AC Prefab Menu sort order problem.
I did not know ActionListAssets could pause gameplay! I thought that was just a menu thing!
Oh, gosh. Sorry! I'll do what you suggested.

Oh, gosh. Sorry! I'll do what you suggested.

Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12