Page 1 of 1

Assigning Bark UI to DontDestroyOnLoad Dialogue Manager

Posted: Wed Jun 05, 2019 1:05 am
by pegassy
I have customized the bark UI to work as a part of the screen space UI, and assigned this to work under the Dialogue System Canvas. So I assign that bark UI in the dialogue actor component. However, since the dialogue manager persists through scenes, the UI will not be recognized except the first level. Is there any solution for this?

Re: Assigning Bark UI to DontDestroyOnLoad Dialogue Manager

Posted: Wed Jun 05, 2019 9:12 am
by Tony Li
Hi,

Here are two ideas:

1. Move the Dialogue Manager's Canvas out of the Dialogue Manager, and put a separate instance of the Canvas in each scene. Add a script to the dialogue UI that calls DialogueManager.UseDialogueUI():

Code: Select all

using UnityEngine;
public class UseMyDialogueUI : MonoBehaviour
{
    void Start() 
    {
        PixelCrushers.DialogueSystem.DialogueManager.UseDialogueUI(this.gameObject);
    }
}
2. Or put the character's bark UI in a separate screen space canvas that exists only in the scene with the character.

Re: Assigning Bark UI to DontDestroyOnLoad Dialogue Manager

Posted: Wed Jun 05, 2019 3:30 pm
by pegassy
Thank you for ideas. I tried the second one and seems to be working pretty good.

Re: Assigning Bark UI to DontDestroyOnLoad Dialogue Manager

Posted: Wed Jun 05, 2019 3:36 pm
by Tony Li
Great! That would have been my preference, too.