NPC's lines are shown in Player's subtitle panel

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
moonbelle
Posts: 3
Joined: Fri Nov 22, 2024 6:45 am

NPC's lines are shown in Player's subtitle panel

Post by moonbelle »

Hi!

I've been using the Dialogue System for my game, and it works well for most cases. However, I'm facing an issue with NPC dialogues. Here’s the setup:

The player has thought bubbles in world space and thoughts displayed in UI scenes (e.g., puzzles, notes).
There are also simple, one-way dialogues between the player and NPCs.
Now, I'm trying to create a dialogue between the player and an NPC. The problem is that all the dialogue lines are displayed only in the player's subtitle panel, and the NPC's subtitle panel is ignored. The same also happens for UI thought subtitle panel and it uses player's thought panel.

Here’s what I’ve done:

1. Assigned actors correctly in the conversation properties.
2. Added the Dialogue Actor component to both the NPC and the player.
3. Made sure the "Is Player" checkbox is unticked for the NPC.
4. Assigned a custom subtitle panel to the NPC, which is a child of its GameObject.
5. Tried starting the conversation both via code and with a Dialogue System Trigger (neither worked).

What could be causing this problem?
Attachments
Screenshot_4.png
Screenshot_4.png (51.29 KiB) Viewed 70 times
Screenshot_2.png
Screenshot_2.png (36.49 KiB) Viewed 70 times
Screenshot_1.png
Screenshot_1.png (66.49 KiB) Viewed 70 times
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC's lines are shown in Player's subtitle panel

Post by Tony Li »

Hi,

Please temporarily set the Dialogue Manager's Debug Level to Info. Then reproduce the problem.

In the Console window, look for a line that starts with:

Code: Select all

Dialogue System: Starting conversation...
Can you post that line here? (Text or screenshot is fine.)
moonbelle
Posts: 3
Joined: Fri Nov 22, 2024 6:45 am

Re: NPC's lines are shown in Player's subtitle panel

Post by moonbelle »

Yes, of course. The console shows that a link has been added to the NPC (Boy) and he speaks a line. But only one subtitle panel is used. Here is the screenshot:
Attachments
Screenshot_2.png
Screenshot_2.png (302.25 KiB) Viewed 57 times
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC's lines are shown in Player's subtitle panel

Post by Tony Li »

Please show the entire "Dialogue System: Starting conversation..." line.
moonbelle
Posts: 3
Joined: Fri Nov 22, 2024 6:45 am

Re: NPC's lines are shown in Player's subtitle panel

Post by moonbelle »

Sorry, I must have misunderstood what was needed. The line: Dialogue System: Starting conversation 'Dialogues/Boy', actor=NPC (UnityEngine.Transform), conversant=Player (UnityEngine.Transform).

Screenshot is also attached.
Attachments
Screenshot_4.png
Screenshot_4.png (27.52 KiB) Viewed 42 times
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC's lines are shown in Player's subtitle panel

Post by Tony Li »

Can you post an inspector screenshot of your dialogue UI's StandardDialogueUI component, with the Subtitle Panels foldout expanded?

Make sure the NPC's subtitle panel is in the Subtitle Panels list and is assigned to the Default NPC Subtitle field.

At any point, please feel free to send a reproduction project to tony (at) pixelcrushers.com
Post Reply