2D-IK Protraits?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SystemId
Posts: 30
Joined: Thu Aug 08, 2019 1:31 pm

2D-IK Protraits?

Post by SystemId »

This question maybe for people familiar with a Spine workflow:

I started using Unity's 2D IK to make animated portraits for my dialogue system.

I figured this was similar to the workflow for people working with Spine animated portraits, but the extra plugins look like they are specifically for spine.

I am wondering if there are any tutorials / ways to instance Game Objects or something instead of using the Portrait Image for Conversants in a conversation?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: 2D-IK Protraits?

Post by Tony Li »

Hi,

It may be possible but clunky to do it without scripting. You can use the SetActive() sequencer command to activate and deactivate GameObjects. You could use it to activate 2D IK portrait GameObjects. It would be easiest in this case if all of the 2D IK portrait GameObjects were already children of the dialogue UI.

However, if you don't mind a little scripting, I recommend taking a look at the Spine integration and implementing something similar. The main components in the integration are:
  • SpineDialogueActor: Lets you associate a Spine portrait GameObject with a character's GameObject.
    Write a similar script that lets you associate a 2D IK portrait. The SpineDialogueActor script assumes the Spine portrait is in the scene, but you could extend your script to instantiate prefabs if you like.
  • SpineSubtitlePanel: Subclass of StandardUISubtitlePanel that overrides the OpenOnStartConversation method to show the Spine portrait.
    Write a similar script to show the character's 2D IK portrait. In your dialogue UI, replace the StandardUISubtitlePanel component(s) with your subclass.
Post Reply