Page 1 of 1

[Solved] Character Dialogue Animation -> Spine Tool

Posted: Fri Aug 17, 2018 6:02 am
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!

Re: Character Dialogue Animation -> Spine Tool

Posted: Fri Aug 17, 2018 9:01 am
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.)

Re: Character Dialogue Animation -> Spine Tool

Posted: Tue Aug 21, 2018 5:36 am
by Japtor
Hi,

Thanks! That helped me a lot! :)