Page 1 of 1

Player and NPC Portraits don't show during conversation

Posted: Fri Jun 30, 2023 3:14 pm
by NiToK
Hi,
I'm creating a custom Dialogue UI based on the Standard Dialogue UI Template. The goal is to show the portraits of the Player and the NPC all the time while the speaking bubbles switch according to who's speaking, , see attachments.

I have 2 issues here:

1. Although the portraits show in the preview, they don't show at all when the conversation is held in game mode, they are actually even disabled. Both are hooked to the Portrait Image field in the Standard UI Subtitle Panel components of there subtitle panels ("PC Subtitle Panel", "PC Response Menu Panel", "NPC Subtitle Panel") of course.

2. If I manually activate the portraits in game mode, the left one (NPC) doesn't show any of the attached portraits in the actor section within the Dialogue Editor (there are 5, prompted with [pic=x] in the dialogue text). The right one (player) on the other hand only shows the portrait linked to the image field before I start the game mode.
I hope I explained it clearly, thanks in advance!

And btw, thanks so much for the initiative and good work here!!

Re: Player and NPC Portraits don't show during conversation

Posted: Fri Jun 30, 2023 7:26 pm
by Tony Li
Hi,

One solution is to set up your dialogue UI like this:
  • Move the portrait images outside of the subtitle panels.
  • Set the subtitle panels' Visibility dropdowns to Always From Start.
  • Clear the subtitle panels' Show & Hide Animation Triggers.
  • Use the OnFocus() and OnUnfocus() events to set "Show" and "Hide" animator triggers.
Here's an example scene:

DS_AlwaysVisiblePortraitsExample_2023-06-30.unitypackage

Re: Player and NPC Portraits don't show during conversation

Posted: Sat Jul 01, 2023 6:25 am
by NiToK
Hi,

thank you for the super fast reply and even attaching example UI SetUps, super helpful!

I deployed your steps (see attachment "SceneMode"), however the portraits still don't show in game mode. Furthermore, the subtitle panels now don't show and hide, the PC subtitle bubble simply overlaps the NPC subtitle bubble, visible by the small speaking bubble corner (green circle in screenshot "GameMode"). I also tried out the example UIs, with the same result.

Any idea, what could be a solution here? Thanks in advance!

Re: Player and NPC Portraits don't show during conversation

Posted: Sat Jul 01, 2023 8:41 am
by Tony Li
Hi,

Did the attached example work correctly in your project? Let's first make sure there's not something funny going on in your project.

If the example works, can you double check the following in your own dialogue UI?
  • Set the subtitle panels' Visibility dropdowns to Always From Start.
  • Clear the subtitle panels' Show & Hide Animation Triggers.
  • Use the OnFocus() and OnUnfocus() events to set "Show" and "Hide" animator triggers.
If those check out, are there any errors or warnings in the Console window when you play?

If not, please feel free to send a reproduction project to tony (at) pixelcrushers.com.

Re: Player and NPC Portraits don't show during conversation

Posted: Sat Jul 01, 2023 6:47 pm
by NiToK
Hi,

thanks again for your super fast reply!

The attached examples unfortunately didn't work: like in my own UI the portraits didn't show at all.
The 3 steps from your previous and this mail I did deploy, you can see it in one of my last attached screenshots e.g. for the NPC subtitle panel in the inspector.

There are errors and warnings in the console but they are about different environmental graphics, no errors refer to the involved objects.

I will pack a reproduction project and send it to you in short notice, thank you so much for the offer!

Re: Player and NPC Portraits don't show during conversation

Posted: Sat Jul 01, 2023 9:26 pm
by Tony Li
I'll keep an eye out for the reproduction project. I suspect it's either something specific in your project or a misunderstanding on my part of what you're looking for. When I run the example here, it looks like this: