Setting Sprites for a Portrait Image

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
AlexNerd
Posts: 39
Joined: Sat Jun 29, 2019 11:46 am

Setting Sprites for a Portrait Image

Post by AlexNerd »

Sorry for asking two questions in a row. Is there a sequencer or Lua command to have a Portrait Image display a certain sprite without going though the Actor? I looked at the UI VN Tutorial but my sprites aren't animated. Is it just a modified SetPortrait command?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Sprites for a Portrait Image

Post by Tony Li »

Hi Alex,

Do you want to use static images or animated images?

In general, you can use the [pic=#] markup tag in your dialogue text, such as:
  • Dialogue Text: "I'm so happy to see you! [pic=2]"
This will show the actor's second portrait image (as assigned in the Dialogue Editor) for that line.

You can also use the SetPortrait() sequencer command to set it for the duration of the conversation.

If you're using animated images, you'll need to add a Dialogue Actor component to the character's GameObject. Then assign an animator controller that's set up to animate the subtitle panel's portrait image as described here.
Post Reply