[SOLVED] Animation not working when interacting twice (SMS)
Posted: Fri Jan 06, 2023 3:46 am
Hi!
I've been using the SMS template for a dialogue UI I'm currently working on, and I've been attempting to change it up to fit what I need. What I've mainly done is remove the portraits from beside the subtitle text (I disabled the "NPC Portrait Image" and "PC Portrait Image" objects) and instead placed new ones as children of the "Dialogue Panel" object. I have basically copied the ones from the Focus template ("Subtitle Panel 0(NPC)" and "Subtitle Panel 1 (PC)"). Everything works almost exactly as intended the first time I run the conversation, however the second time I try to run it during the same "playthrough", the portraits and names for both the NPC and the player don't show up. After a lot of debugging, I've determined it's the animations that don't start. They stay in the "start" state and never leave there even if I try to play the interaction a third time. I'm using the standard "Canvas Group Animator Controller" and have an Animator placed on the "Subtitle Panel 0 (NPC)", "Subtitle Panel 1 (PC)" (both copied from the Focus template) and one on the "Dialogue Panel". The animation works just fine on the "Dialogue Panel", just not on the subtitle panels.
Other than that, the "focus" and "unfocus" animations don't seem to ever play, and I do have them added in the "Focus Animation Trigger" and "Unfocus Animation Trigger" part of the "Standard UI Subtitle Panel" script that I have attached both to my subtitle panels and "NPC Message Template" and "PC Message Template". Not entirely sure why those two animations just don't work here.
Here's a picture of how my objects are set up:
I've been using the SMS template for a dialogue UI I'm currently working on, and I've been attempting to change it up to fit what I need. What I've mainly done is remove the portraits from beside the subtitle text (I disabled the "NPC Portrait Image" and "PC Portrait Image" objects) and instead placed new ones as children of the "Dialogue Panel" object. I have basically copied the ones from the Focus template ("Subtitle Panel 0(NPC)" and "Subtitle Panel 1 (PC)"). Everything works almost exactly as intended the first time I run the conversation, however the second time I try to run it during the same "playthrough", the portraits and names for both the NPC and the player don't show up. After a lot of debugging, I've determined it's the animations that don't start. They stay in the "start" state and never leave there even if I try to play the interaction a third time. I'm using the standard "Canvas Group Animator Controller" and have an Animator placed on the "Subtitle Panel 0 (NPC)", "Subtitle Panel 1 (PC)" (both copied from the Focus template) and one on the "Dialogue Panel". The animation works just fine on the "Dialogue Panel", just not on the subtitle panels.
Other than that, the "focus" and "unfocus" animations don't seem to ever play, and I do have them added in the "Focus Animation Trigger" and "Unfocus Animation Trigger" part of the "Standard UI Subtitle Panel" script that I have attached both to my subtitle panels and "NPC Message Template" and "PC Message Template". Not entirely sure why those two animations just don't work here.
Here's a picture of how my objects are set up: