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
How to activate the controller in the Dialogue System
-
- Posts: 3
- Joined: Tue Oct 02, 2018 10:41 pm
How to activate the controller in the Dialogue System
- Attachments
-
- Untitled.jpg (198.12 KiB) Viewed 688 times
Re: How to activate the controller in the Dialogue System
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:
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:
In the example, these states' animation clips play sprite animation on a GameObject named "Portrait Image 0":
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().
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:
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:
In the example, these states' animation clips play sprite animation on a GameObject named "Portrait Image 0":
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().