How to use Spine Actors as Portraits?

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use Spine Actors as Portraits?

Post by Tony Li »

Two ways to do that:

1. Name the Spine Actor GameObjects the same as the actor names in your dialogue database.

2. Or add a Dialogue Actor component to the Spine Actor, and select the corresponding actor name in your dialogue database.
Ducky
Posts: 10
Joined: Fri Apr 24, 2020 2:37 am

Re: How to use Spine Actors as Portraits?

Post by Ducky »

Sadly, I've already done that. It only seems to work when the characters are already in the scene and not under a Subtitle Panel. Also when I try spawning them (through the dialogue sequencer) it doesn't work. Does work if I spawn them (not using sequencer) before starting the conversation and not being child to a Subtitle Menu.

But if I replace 'speaker' to the name of the actor in the Node Dialogue Sequencer. It works! This will work for when I'm doing expressions for the actor. However, for the talking. I wanted to use the default sequencer, to grab the current speaker and play the talking animation. Speaker returns null and therefore can't play the animation.

So, I think for now. I will need to go to every node and set them to talk for the duration of the typewriter sequence.

I am assuming typing in 'speaker' will return the actor who is talking in the Dialogue Node but I could be wrong.

Also when the Dialogue System is searching for actor gameObjects, is there a limit to how many children it can search?

Big thank you anyway! I tried being detailed but specific. Sorry if it's confusing.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use Spine Actors as Portraits?

Post by Tony Li »

This may help:

Every conversation has a primary actor and a primary conversant.

When you start a conversation, it associates GameObjects with the conversation's primary actor and conversant according to these rules: Character GameObject Assignments

To see what GameObjects are assigned, set the Dialogue Manager's Debug Level to Info. When the conversation starts, check the Console for a line like:

Dialogue System: Starting conversation 'XXX' with actor=YYY and conversant=ZZZ

where YYY and ZZZ are the GameObjects. They could also be blank if the Dialogue System was not able to associate a GameObject with either one.

In the Dialogue Editor, check which actors are assigned to your conversation. Click blank canvas space to view the conversation's properties. Then check each node to make sure the right actor is assigned. The node's Actor selection specifies its 'speaker'.

Conversations can also assign nodes to additional actors. In this case, the Dialogue System will check if a GameObject has a Dialogue Actor component that's set to that actor. If so, it will use that GameObject as the speaker. Otherwise it will look for a GameObject whose GameObject name matches the actor's name as the speaker. If it doesn't find that either, the speaker will be null.

If that doesn't shed enough light on it, please feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look directly and let you know what needs to be adjusted so you can use 'speaker'.
Post Reply