Portrait Size

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
naruhodo469
Posts: 7
Joined: Thu Aug 31, 2023 1:21 am

Portrait Size

Post by naruhodo469 »

Hello, I'm currently using the visual novel template and trying to add an image to the actor's portrait. However, after adding it, my photo did not look original. Are there any ways to make the portrait normal? Thanks.
User avatar
Tony Li
Posts: 22114
Joined: Thu Jul 18, 2013 1:27 pm

Re: Portrait Size

Post by Tony Li »

Hi,

Inspect your dialogue UI. (It's a variant of the VN Template Standard Dialogue UI prefab.) Adjust the portrait images to the sizes you want to use. Then inspect the subtitle panel GameObject (e.g., Subtitle Panel 0) and tick the Standard UI Subtitle Panel component's Use Portrait Native Size.
naruhodo469
Posts: 7
Joined: Thu Aug 31, 2023 1:21 am

Re: Portrait Size

Post by naruhodo469 »

Thank you, I did it by your solution. Also, how can I want to arrange the portrait position in the conversation? For example, NPC1 is on the left, and NPC2 is on the right. Thanks.
User avatar
Tony Li
Posts: 22114
Joined: Thu Jul 18, 2013 1:27 pm

Re: Portrait Size

Post by Tony Li »

Hi,

Use multiple subtitle panels. Each subtitle panel has a portrait image in a specific position. Most of the prefab dialogue UIs have two subtitle panels (one for NPCs, one for PCs) but a dialogue UI can have as many subtitle panels as you want. Use Dialogue Actor components on characters' GameObjects to specify which subtitle panel to use. You can also tell an actor to use a different subtitle panel using the [panel=#] markup tag or SetPanel() sequencer command, similarly to how you can change which portrait image an actor shows by using [pic=#] or SetPortrait().

For an example, see the VN UI example (direct download) on the Dialogue System Extras page.
Post Reply