NPC Subtitle Panel not showing up

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
singhjason75
Posts: 9
Joined: Mon Jun 15, 2020 10:15 am

NPC Subtitle Panel not showing up

Post by singhjason75 »

Hello, its me again! Sorry for all the questions, I'm still pretty new to this!

I am having an issue where the NPC subtitle panel isn't showing, while the response panel is working fine. In fact, I can click on the responses, and there's an appropriate pause as if there's NPC dialogue being typed out, before the next set of responses then show up. In addition, there seems to be no console errors at all.

I'm using the Basic Standard Dialogue UI, and attached is the subtitle settings I have on the dialogue manager.

Once again, thank you so much for all your help!
Attachments
subtitle screenshot.png
subtitle screenshot.png (57.95 KiB) Viewed 280 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC Subtitle Panel not showing up

Post by Tony Li »

Hi,

If you're playing in the editor, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log a lot of info to the Console window.

When the conversation gets to an NPC line, it will log something like:

Dialogue System: NPC says 'something'

At this point, pause the game. In the Hierarchy, inspect DontDestroyOnLoad > Dialogue Manager > Canvas > Basic Standard Dialogue UI > Dialogue Panel > NPC Subtitle Panel > Subtitle Text. (Or wherever your dialogue UI happens to be in the Hierarchy.)

Does it contain the NPC's dialogue text?

If so, can you find the subtitle panel in the Scene view? Maybe your Canvas is being scaled so the panel isn't onscreen.

Or perhaps an Animator or something is keeping the panel deactivated or setting its Canvas Group's Alpha value to zero, which makes it invisible.
singhjason75
Posts: 9
Joined: Mon Jun 15, 2020 10:15 am

Re: NPC Subtitle Panel not showing up

Post by singhjason75 »

So, as it turns out, it was a problem with the canvas scaling. The UI elements were more cramped on a smaller Game Screen vs a larger one, where they then become quite spread out.

Usually, when I try and test something on the Game View, I use "Maximize on Play". As a result, the NPC Subtitle panel was offscreen. I did a quick fix for this by going into the Dialogue UI Prefab settings and moving the NPC Subtitle Panel down.

Also, I then added a Canvas Scaler component to the Canvas child of the dialogue Manager, and set the UI Scale Mode to scale with screen size. Right now, the NPC subtitle panel seems to be showing up now, so I'm able to keep on working.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPC Subtitle Panel not showing up

Post by Tony Li »

Great! I was going to suggest adjusting the Canvas Scaler. It has tradeoffs, as text can get very small in low resolutions and very large in high resolutions since it's all proportional to the screen size. But it's a good way to make sure everything looks the most proportional to the way you originally designed it.
Post Reply