Animated sprite error.
-
- Posts: 9
- Joined: Fri Apr 21, 2023 4:11 pm
Animated sprite error.
I tried to follow the video and manual for setting up animated sprites, but I've had some trouble with getting animations to play. There is an animator component on the portrait image panel, the animator controller does show up when the dialogue is triggered, I animated the portrait as a canvas image, but the animations won't play. the animator shows that it is missing the image to animate and I am confused as I didn't see anything about how that part works or how to make sure it uses it's own image. I don't remember if anything specified this, but do I need to use the portrait image's animator component to animate the different sprites or should I use the actor to animate the portrait sprites?
- Attachments
-
- Screenshot 2023-05-05 222115.png (135.83 KiB) Viewed 310 times
-
- Screenshot 2023-05-05 221944.png (70.57 KiB) Viewed 310 times
-
- Screenshot 2023-05-05 221851.png (49.17 KiB) Viewed 310 times
-
- Screenshot 2023-05-05 145352.png (23.1 KiB) Viewed 310 times
Re: Animated sprite error.
Hi,
Animate the property named "Portrait Image", or name your Portrait Image GameObject to "Image". Either way will get the name in the animation to match the name in your dialogue UI. If you want to rename the property named in the animation, you can rebuild your animation or use the open source Unity Animation Hierarchy Editor tool explained here.
Animate the property named "Portrait Image", or name your Portrait Image GameObject to "Image". Either way will get the name in the animation to match the name in your dialogue UI. If you want to rename the property named in the animation, you can rebuild your animation or use the open source Unity Animation Hierarchy Editor tool explained here.
-
- Posts: 9
- Joined: Fri Apr 21, 2023 4:11 pm
Re: Animated sprite error.
I already tried naming the portrait image to just "Image" before but I did it again just to make sure.
I still get the same problem. Should I be using the portrait image's animator component for all NPC animations? I didn't see if that was specified anywhere.
I still get the same problem. Should I be using the portrait image's animator component for all NPC animations? I didn't see if that was specified anywhere.
- Attachments
-
- Screenshot 2023-05-06 115447.png (66.77 KiB) Viewed 300 times
Re: Animated sprite error.
Hi,
Does your Image GameObject have an Image component?
The Image GameObject should have an Animator component. However, the Dialogue System will assign a different animator controller asset to the Animator component for each actor. Add a Dialogue Actor component to the actor's GameObject, and assign the actor's portrait animator controller (i.e., the one that animates the Image component's Sprite).
Does your Image GameObject have an Image component?
The Image GameObject should have an Animator component. However, the Dialogue System will assign a different animator controller asset to the Animator component for each actor. Add a Dialogue Actor component to the actor's GameObject, and assign the actor's portrait animator controller (i.e., the one that animates the Image component's Sprite).
-
- Posts: 9
- Joined: Fri Apr 21, 2023 4:11 pm
Re: Animated sprite error.
I'm so dumb. I was animating a separate child object instead of the object with the animator component. It's all working good now. Thank you for your help.
Re: Animated sprite error.
Happy to help! Glad it's working now.