How to activate the controller in the Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
kentcheung2000
Posts: 3
Joined: Tue Oct 02, 2018 10:41 pm

How to activate the controller in the Dialogue System

Post by kentcheung2000 »

Hi

I am new to Dialogue System and i am trying to understand the example from the following link. And there is one part I don't understand and it is the controllers in the example. (See Attachment)

My question is how and when to activate the Show, Hide, Focus, Unfocus in the controllers. I cannot find how it is done in the package I download from the youtube.

Thanks in advance.

KC


Attachments
Untitled.jpg
Untitled.jpg (198.12 KiB) Viewed 700 times
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to activate the controller in the Dialogue System

Post by Tony Li »

Hi KC,

Are you asking about showing and hiding the subtitle panels?
Or showing and hiding the subtitle panels' portrait images?
Or controlling the sprite animation that plays in the portrait images?


If you're asking about showing and hiding the subtitle panels, the Dialogue System takes care of this automatically. You can tell the Dialogue System how it should show and panels by setting the Visibility dropdown:

Image

For example, if it's set to Always From Start, then the Dialogue System will show the subtitle panel as soon as the conversation starts. The subtitle panel will stay visible until the conversation ends.

If it's set to Only During Content, then the subtitle panel will only appear when a subtitle is playing. When the subtitle is done playing, the panel will immediately disappear.


If you're asking about controlling the sprite animation:

1. Assign the character's GameObject to the Dialogue System Trigger.

2. The GameObject must have a Dialogue Actor component.

3. Assign the character's sprite animator controller to the Dialogue Actor component's Dialogue UI Settings > Portrait Animator Controller field.

The animator controller will have a default animation state. Typically this state plays an idle animation. It may also have other states. For example, Emi's animator controller has two states, Idle and Talk:

Image

In the example, these states' animation clips play sprite animation on a GameObject named "Portrait Image 0":

Image

When a character is speaking, the Dialogue System will automatically assign the character's Portrait Animator Controller to the portrait image (in this case, Portrait Image 0). To change animation states, use sequencer commands such as AnimatorPlay().
Post Reply