Page 1 of 1

Setting Sprites for a Portrait Image

Posted: Thu May 28, 2020 1:19 pm
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?

Re: Setting Sprites for a Portrait Image

Posted: Thu May 28, 2020 1:35 pm
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.