Npc's portrait is not setting when player starting conversations.
Npc's portrait is not setting when player starting conversations.
So my problem is that when player has first line of dialogue it's not setting npc's image and name correctly, what's important whole subtitle panel is visible, cause I set it to always visible on start. When npc has first line of dialogue its working pretty fine, but the problem is when player has first line of dialogue, then npc is not talking to us and what I just want to have it's npcs image, but the gameobject with portrait is off, when I as player choose on of the dialogue options then npc answers and his portrait appear. What should I do, is it possible to solve that without creating custom script which would inherit subtitle panel.
Re: Npc's portrait is not setting when player starting conversations.
Make sure the NPC subtitle panel's Visibility is set to Always From Start (not just the player's panel), and that the dialogue UI's Standard Dialogue UI > Conversation UI Elements > Allow Open Subtitle Panels On Start is ticked.
Re: Npc's portrait is not setting when player starting conversations.
So, these both are set like you've said, for dialogues in my game, I have just one subtitle panel (npc). I attach config of these both components below, so you can see. I also attach hierarchy of gameobjects. As you can see, npc's portrait gameobject is not active, also image of this gameobject is not set (none). What interesting tmpro gameobject is enabled even tho text of the npc at the start of the conversation is empty, which is correct because the player start conversation. So he has to choose on of the options to start it.
- Attachments
-
- Zrzut ekranu_20221212_134841.png (4.53 KiB) Viewed 294 times
-
- Zrzut ekranu_20221212_134816.png (68.42 KiB) Viewed 294 times
-
- Zrzut ekranu_20221212_134535.png (56.77 KiB) Viewed 294 times
Re: Npc's portrait is not setting when player starting conversations.
Hi,
Are there any errors or warnings in the Console window?
Try assigning the Subtitle Panel to the StandardDialogueUI component's Default PC Subtitle Panel.
You can also try ticking the subtitle panel's Only Show NPC Portraits checkbox if that's the behavior you want.
Are there any errors or warnings in the Console window?
Try assigning the Subtitle Panel to the StandardDialogueUI component's Default PC Subtitle Panel.
You can also try ticking the subtitle panel's Only Show NPC Portraits checkbox if that's the behavior you want.
Re: Npc's portrait is not setting when player starting conversations.
There are no any errors, I've tried with both checkboxes and that doesn't help. It's kinda weird, npc's portrait is set up correctly and it happens with every npc and every dialogue where player is the one who starts. Sample dialogue looks like that, maybe conversation in database is the place when I can set it up .. I don't really know
- Attachments
-
- Zrzut ekranu_20221212_144926.png (18.34 KiB) Viewed 292 times
Re: Npc's portrait is not setting when player starting conversations.
Try setting up two subtitle panels -- one for PC, one for NPC -- that share the same UI elements except the portrait elements.