Hey so maybe I missed something somewhere, but I have a couple NPCs/Computer things that I would like to use a different UI prefab, and i have it working with the Display Override Settings component, but only once- if i leave and come back its the same UI.
I can get it working if i use the Override UI component it works, but i dont get the camera/sequencing stuff.
I think i mightve missed something somewhere, is there anywhere I should be looking?
Override UI only working once
Re: Override UI only working once
Hi,
If it points to a UI in the Dialogue Manager, here's an example of what happens to cause the issue:
You load Scene A for the first time. Call this instance of the scene A1. It has a Dialogue Manager A1. The Computer A1's Override Display Settings points to Dialogue Manager A1's SpecialComputerDialogueUI (a child of Dialogue Manager A1's Canvas).
You change to Scene B, which has a Dialogue Manager B1. Dialogue Manager A1 survives the scene change and replaces Dialogue Manager B1. So Scene B ends up containing Dialogue Manager A1.
You change back to Scene A. Call this instance of the scene A2. The Computer A2's Override Display Settings point to Dialogue Manager A2's SpecialComputerDialogueUI. Dialogue Manager A1 survives the scene change and replaces Dialogue Manager A2. So Scene A2 ends up containing Dialogue Manager A1. Computer A2 ends up pointing to nothing, since Dialogue Manager A2 no longer exists.
Is the Override Display Settings component on the NPC/Computer? If so, make sure its Dialogue UI field points to a prefab or a UI in the scene, but not to a UI in a GameObject that survives scene changes, such as the Dialogue Manager.
If it points to a UI in the Dialogue Manager, here's an example of what happens to cause the issue:
You load Scene A for the first time. Call this instance of the scene A1. It has a Dialogue Manager A1. The Computer A1's Override Display Settings points to Dialogue Manager A1's SpecialComputerDialogueUI (a child of Dialogue Manager A1's Canvas).
You change to Scene B, which has a Dialogue Manager B1. Dialogue Manager A1 survives the scene change and replaces Dialogue Manager B1. So Scene B ends up containing Dialogue Manager A1.
You change back to Scene A. Call this instance of the scene A2. The Computer A2's Override Display Settings point to Dialogue Manager A2's SpecialComputerDialogueUI. Dialogue Manager A1 survives the scene change and replaces Dialogue Manager A2. So Scene A2 ends up containing Dialogue Manager A1. Computer A2 ends up pointing to nothing, since Dialogue Manager A2 no longer exists.
Re: Override UI only working once
That's what i thought!
It was happening on a per-conversation level, when like say leaving or accepting a quest and then returning.
I was able to make it work right by using the Override UI component, and modifying the conversation sequences to properly lerp the camera over time, rather than instant cuts, which seems to do just fine!
But yeah that all makes sense. Thanks for clarifying!
And i am using a "DefaultNPCUI" prefab in my Dialogue Manager prefab that moves between scenes, do you recommend using the Prefab option or instantiating the prefab canvas?
It was happening on a per-conversation level, when like say leaving or accepting a quest and then returning.
I was able to make it work right by using the Override UI component, and modifying the conversation sequences to properly lerp the camera over time, rather than instant cuts, which seems to do just fine!
But yeah that all makes sense. Thanks for clarifying!
And i am using a "DefaultNPCUI" prefab in my Dialogue Manager prefab that moves between scenes, do you recommend using the Prefab option or instantiating the prefab canvas?
Re: Override UI only working once
Unless your UIs have a ton of large images, it's simpler to just assign prefabs to Override Dialogue UI and let it handle instantiating.
BTW, you can set default sequences and other settings on a per-conversation basis. Inspect the conversation in the Dialogue Editor window, click on blank canvas space to view the conversation's properties, and tick Override Display Settings.
BTW, you can set default sequences and other settings on a per-conversation basis. Inspect the conversation in the Dialogue Editor window, click on blank canvas space to view the conversation's properties, and tick Override Display Settings.