Character disappearing when animation plays

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Boydy111
Posts: 15
Joined: Sun Jul 28, 2024 12:20 am

Character disappearing when animation plays

Post by Boydy111 »

Hi
I'm using unity 2021.3.30f and the 2.2.50.1 Version of Dialogue system


I'm running into an issue currently that for the life of me i cannot diagnose.

Everything works fine until a character plays their animation again, in which case they proceed to not only not play that animation, but disable their portrait image as well somehow!

Im using AnimatorPlay(Animation,Portrait Image 0); for the sequencer command on both instances since characters all talk on the same Portrait image.

If it would make it easier i am more than ready to send a Repro project
User avatar
Tony Li
Posts: 22904
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character disappearing when animation plays

Post by Tony Li »

Hi,

Yes, if you could please send a reproduction project to tony (at) pixelcrushers.com, that would be great.

Make sure your actor has a portrait image assigned in the Dialogue Editor's Actors section, even if it's going to use an animator and animated portraits.
Boydy111
Posts: 15
Joined: Sun Jul 28, 2024 12:20 am

Re: Character disappearing when animation plays

Post by Boydy111 »

Hi Tony


Ive just sent the project off

I should have a portrait image attached to all the Dialogue editors actors already


Thank you for your quick response! :)
User avatar
Tony Li
Posts: 22904
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character disappearing when animation plays

Post by Tony Li »

Thanks for sending the repro project.

I replied to your email with more details, but I'll recap it below:

Portrait Image 0 gets the NPC's animator controller on the node you specified. But animator controller's default state doesn't have an animation assigned, so it clears the subtitle panel's Portrait Image. The subtitle panel then immediately sees that the Portrait Image doesn't have a sprite, so it deactivates it.

The solution is to assign an animation to the default state, even if the sequence is going to use an AnimatorPlay() sequencer command to change the state.
Post Reply