简体   繁体   中英

Unity Animation not working on different scene

I'm working on a menu scene where the options come down from top, so I tried to use Unity simple Animator. The problem is the animation won't work. The weird part is, when I tried the same thing on my game scene the animation works.

-I've checked that the animation is attached to the object -Culling type is Always Animate -I've also added a script and tried to force the animation with no results.

Why doesn't the animation not working anything other than the main scene? Do I need to trigger something for it to work?

Things you could check:

  1. Make sure you are using the same kind of component in both scenes. Animator is different from Animation.
  2. If you have an Animator component make sure you have an the right Animation Controller attached to it.
  3. If you have an Animation component make sure that the Animation field is set and holds your animation file and Animation s is set too and holds the list of possible animations of your (UI) object.
  4. Even though they have the same extension, .anim files created when an Animation component is attached are different from .anim files created when an Animator component is attached so if you try to play an Animator .anim it won't play with an Animation component.
  5. Is your Animation set to play automatically? If not, are you giving the animation.Play() command somewhere in your code?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM