Page 1 of 1

Replacing Override Unity UI Dialogue Controls

Posted: Mon Sep 30, 2019 11:05 am
by OneManOnMars
Alright, we moved from DS 1.7 to 2.2 finally and let's say with some work put into it - the results are good. But there is this warning that I would like to get rid of:

Code: Select all

Dialogue System: OverrideUnityUIDialogueControls is deprecated and will be removed in the next version. Use StandardDialogueUI and DialogueActor, which make this script unnecessary.
UnityEngine.Debug:LogWarning(Object, Object)
PixelCrushers.DialogueSystem.Tools:DeprecationWarning(MonoBehaviour, String) (at Assets/Pixel Crushers/Dialogue System/Scripts/Utility/Tools.cs:21)
PixelCrushers.DialogueSystem.OverrideUnityUIDialogueControls:Awake() (at Assets/Pixel Crushers/Dialogue System/Scripts/UI/Unity UI/Dialogue/OverrideUnityUIDialogueControls.cs:30)
I am using a slightly modified speech bubble canvas version of the UI.

Image

The setup look like this:
Image

Image

As I understand it I should now replace the Override Unity UI Dialogue Controls Component with the Standard Dialogue UI.
So I took the template subtitle panel and rebuilt it accordingly.
Image

But the fruits of this labor looks like this:
Image

It seems as if the system falls back to the standard UI and I don't know where this went wrong.

Re: Replacing Override Unity UI Dialogue Controls

Posted: Mon Sep 30, 2019 11:14 am
by Tony Li
Hi,

Those images didn't come through. Would you mind reposting them please?

Re: Replacing Override Unity UI Dialogue Controls

Posted: Mon Sep 30, 2019 5:35 pm
by OneManOnMars
Oh! It is replaced. Sorry about that :)

Re: Replacing Override Unity UI Dialogue Controls

Posted: Mon Sep 30, 2019 8:40 pm
by Tony Li
It works a little differently with the Standard Dialogue UI. But it's much simpler than the previous Unity UI Dialogue UI. Here are the steps:

1. Keep a Standard Dialogue UI assigned to the Dialogue Manager's Dialogue UI field.

2. Do not add another Standard Dialogue UI component to the NPC's bubble subtitle panel. Instead, add a Standard UI Subtitle Panel component, and assign the UI elements to the its fields (Panel, Subtitle Text, etc.).

3. Add a Dialogue Actor component to the NPC. Set the Dialogue UI Settings > Subtitle Panel Number to Custom, and assign the bubble subtitle panel to the Custom Subtitle Panel field.

Re: Replacing Override Unity UI Dialogue Controls

Posted: Tue Oct 01, 2019 6:35 am
by OneManOnMars
Hey Tony, thank you so much for your explanation. I am almost there but have a small problem I can't figure out.

On the Dialogue Manager - Dialogue UI I exchanged the Unity UI Dialogue UI with the Standard Dialogue UI.
Image

On the NPCs I added the Dialogue Actor and just to make sure I exchanged the old Conversation Trigger with the new Dialogue System Trigger.
Image

On the NPCs Speech Bubble Canvas I exchanged the Override Unity UI Dialogue Controls with the Standard UI Subtitle Panel and assigned the UI Elements.

Image

While testing it I figured out that it does work but the bubble only appears for a blink of an eye and disappears again. The conversation gets started this is visible due to the letterbox mode that is active as well. I can't advance in the conversation but only cancel each part with escape until the conversation is over.

Looking over the new components I played around with some settings but could not find the problem. Is this a setting issue or did I go wrong with my setup?

Image

Re: Replacing Override Unity UI Dialogue Controls

Posted: Tue Oct 01, 2019 9:26 am
by Tony Li
As a test, please set the bubble panel's Visibility to Until Superceded. Let me know if it still hides immediately or if it stays visible.

Also, untick Has Focus. The bubble panel will turn Has Focus on when it appears. I don't think this will fix the problem, but it's worth a test for more info.

Also, I recommend leaving the Dialogue Manager's Debug Level at Warning. The dialogue UI reports configuration issues at the Warning level. If you set Debug Level to Error, you won't get those warnings.

Re: Replacing Override Unity UI Dialogue Controls

Posted: Tue Oct 01, 2019 10:07 am
by OneManOnMars
thanks Tony!

I have made as you suggested with no visible difference in the result. There are some warnings in the scene coming from DS. Most of them are from other Bubbles that are not adappted yet. And a few from the main Speech Bubble Dialogue UI that a few assets have not been assigned. But since I never use the main Canvas UI but only World Space UI, I hope I can ignore all that.

- No response menu panel
- Unity UITextFieldUI is deprecated

Re: Replacing Override Unity UI Dialogue Controls

Posted: Tue Oct 01, 2019 10:33 am
by Tony Li
You can ignore those warnings, or we can fix them later once we resolve the current issue. (UnityUITextFieldUI has been replaced by StandardTextFieldUI.)

Does it look like the bubble panel's Animator triggers the Show state and then immediately triggers the Hide state?

Would you please compare your setup with the bubble subtitle example on the Dialogue System Extras page?