Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
This question was closed Sep 25, 2015 at 01:46 PM by Lazybones94 for the following reason:

Problem is not reproducible or outdated

avatar image
1
Question by Lazybones94 · Sep 23, 2015 at 08:31 AM · animationui image

UI Image animation not working after update to 5.2.0

Hello everybody. I've been making a game in the older version(5.0.3 as far as I remember), and I've been using animations with UI Images. I have a portrait of a cat, I add it to image, then via the Animation tab I add the same image with its open mouth, then configurate animation controller in the Animator tab and it has been working perfect. But after the update every time I try to animate the image in the same way, when the cat is supposed to open his mouth he becomes a big white square and no animation plays. Besides, when I play the animation through the Animation tab, it works well with both in the scene and game tabs and I see it animating. But when I press "Play" button it doesn't. The UI image is a child of a standard Canvas with no properties changed. Who knows what's the problem and how to solve it?

And there is one more thing I forgot to add(I googled the problem but there were no answers) - besides the image animation broken, when it tries to animate there is always an error "Invalid AABB inAABB UnityEngine.Canvas:SendWillRenderCanvases()". I do not know what does this mean, but this error occurs only in this project - I tried to create an animation in the same way in another project, it did not work anyway but there was no such error.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Nerevar · Sep 23, 2015 at 08:43 AM 0
Share

Yep, there seems to be a bug with animation and updating the UI images. I use this temporary script to force the Image to update while the animation is playing (in Unity 4.6 though).

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 [RequireComponent(typeof(Animation))]
 [RequireComponent(typeof(Image))]
 public class UIAnimationUpdator : $$anonymous$$onoBehaviour {
 
 
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
         if (animation.isPlaying)
             GetComponent<Image> ().SetAllDirty ();
     
     }
 }
 

Note you might prefer to have a reference of you Image in this script rather than doing a GetComponent() in the update as it is not very efficient.

avatar image Lazybones94 Nerevar · Sep 23, 2015 at 08:54 AM 0
Share

this doesn't work - "There is no 'Animation' attached to the "Cat" game object, but a script is trying to access it." my image has Animator component, and even when I access it through GetComponent().GetBool("isTalking"), the SetAllDirty() method does not solve the problem. It is still a white square

avatar image Nerevar Lazybones94 · Sep 23, 2015 at 09:02 AM 0
Share

ok your bug is not the same as $$anonymous$$e then :/ I don't have the solution atm

avatar image Lazybones94 · Sep 23, 2015 at 12:44 PM 0
Share

The AABB error was co$$anonymous$$g from a child animated image, it was not animated because of error in the parent image so do not $$anonymous$$d about that error. I also found out that even while the PLAY mode I can play the animation through the Animation tab and it will play as expected, but from the animator it does not...

1 Reply

  • Sort: 
avatar image
0

Answer by Lazybones94 · Sep 25, 2015 at 01:45 PM

Solved - in the new version Unity does not allow animations with 0 speed

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MandL27 · Jan 28, 2017 at 05:29 PM 0
Share

I'm experiencing what I believe to be a similar problem - when I add animations to UI images (in this case, changing the render color to cycle through a rainbow), the animation freezes on the first frame and refuses to advance past it. Like you said, it's viewable just fine through the Animator tab, but does not work in playmode.

Follow this Question

Answers Answers and Comments

33 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can I make a dynamic wave ui with shader ? 0 Answers

How to animate a RawImage in UI with a series of PNG files?,How to animate a Raw Image in UI with a series of seperate PNGs? 1 Answer

Remember UI setting from Previous Scene When Return to Scene 0 Answers

Advanced UI animations 0 Answers

How to animate the alpha channel of the UI image color property only (keep the current rgb values)? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges