[Solved] Character Dialogue Animation -> Spine Tool

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

[Solved] Character Dialogue Animation -> Spine Tool

Post by Japtor »

Hi,

I am using the Spine Tool to set up some animations for some NPC's portrait when a conversation starts.

Is there a way I could check which NPC I am having a conversation with for swapping the spine skeleton UI?

Thanks!
Last edited by Japtor on Tue Aug 21, 2018 5:36 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character Dialogue Animation -> Spine Tool

Post by Tony Li »

Hi,

Yes, it's DialogueManager.currentConversant.

Also, if you have a script or Dialogue System Events on the player, its OnConversationStart event will receive the transform of the NPC:

Code: Select all

void OnConversationStart(Transform npc) {
    Debug.Log("Player is starting conversation with NPC " + npc);
}
(Note: If the script or Dialogue System Events is on the NPC or Dialogue Manager, its OnConversationStart event will receive the transform of the player.)
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Character Dialogue Animation -> Spine Tool

Post by Japtor »

Hi,

Thanks! That helped me a lot! :)
Post Reply