In some of my dialogues, the actor portraits are set wrongly. I'm using a template that always shows both, and it works perfectly most of the time. However, when the player can select an answer, it shows the player icon for both speakers. In this screenshot, "Agnes" (the NPC) has her own portrait, and whenever she has a dialog it shows up correctly, as well as when she is talking with another NPC. This only happens when the player has a dialog choice:
I tried to figure out what's causing it, but couldn't.
Bug with actor portraits showing the wrong one on player input
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Bug with actor portraits showing the wrong one on player input
Hi,
Your dialogue UI probably has three Image components for portraits:
If that's not what you want to do, let me know. We can look into actor mismatches.
Your dialogue UI probably has three Image components for portraits:
- A subtitle panel portrait image on the left
- A subtitle panel portrait image on the right
- A response menu panel player image on one side or the other.
If that's not what you want to do, let me know. We can look into actor mismatches.
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Bug with actor portraits showing the wrong one on player input
Finally found it. It wasn't this, but your answer put me on the right path.
The problem only appeared on response menus. Since my game always shows the speaker on the left and the listener on the right (using a simple script to update them in OnConversationLine) it actually changed the speaker portrait twice - once in OnConversationLine and once in the StandardUISubtitlePanel. Since this was always the same sprite, I never noticed.
But on responses, a different script is run - StandardUIMenuPanel - which also updates the speaker image, but since OnConversationLine isn't triggered for response menus, only the speaker and not the listener portrait was updated.
The fix was to simple set the "PC Image" field to none in StandardUIMenuPanel.
The problem only appeared on response menus. Since my game always shows the speaker on the left and the listener on the right (using a simple script to update them in OnConversationLine) it actually changed the speaker portrait twice - once in OnConversationLine and once in the StandardUISubtitlePanel. Since this was always the same sprite, I never noticed.
But on responses, a different script is run - StandardUIMenuPanel - which also updates the speaker image, but since OnConversationLine isn't triggered for response menus, only the speaker and not the listener portrait was updated.
The fix was to simple set the "PC Image" field to none in StandardUIMenuPanel.
Re: Bug with actor portraits showing the wrong one on player input
Glad you found it!