Assigning Bark UI to DontDestroyOnLoad Dialogue Manager
Assigning Bark UI to DontDestroyOnLoad Dialogue Manager
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
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():
2. Or put the character's bark UI in a separate screen space canvas that exists only in the scene with the character.
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);
}
}
Re: Assigning Bark UI to DontDestroyOnLoad Dialogue Manager
Thank you for ideas. I tried the second one and seems to be working pretty good.
Re: Assigning Bark UI to DontDestroyOnLoad Dialogue Manager
Great! That would have been my preference, too.