Page 1 of 1
Npc's portrait is not setting when player starting conversations.
Posted: Mon Dec 12, 2022 7:13 am
by Adeoon
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.
Posted: Mon Dec 12, 2022 7:39 am
by Tony Li
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.
Posted: Mon Dec 12, 2022 7:51 am
by Adeoon
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.
Re: Npc's portrait is not setting when player starting conversations.
Posted: Mon Dec 12, 2022 8:12 am
by Tony Li
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.
Re: Npc's portrait is not setting when player starting conversations.
Posted: Mon Dec 12, 2022 8:52 am
by Adeoon
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
Re: Npc's portrait is not setting when player starting conversations.
Posted: Mon Dec 12, 2022 10:06 am
by Tony Li
Try setting up two subtitle panels -- one for PC, one for NPC -- that share the same UI elements except the portrait elements.