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 /
avatar image
0
Question by Treyzania · Nov 27, 2015 at 10:36 AM · c#animationanimator

Animator is not playing a Playable

I am receiving a Warning in the log when I make a call to Animator:SetBool

Below is the call trace I am getting from it:

 Animator is not playing a Playable
 UnityEngine.Animator:SetBool(String, Boolean)
 ItemPurchaseConfirmation:BeginPurchase(ButtonBuy, Action 1) (at Assets/ItemPurchaseConfirmation.cs:48)
 ButtonBuy:OnButton() (at Assets/Code/Scripts/Store/ButtonBuy.cs:46)
 UnityEngine.EventSystems.EventSystem:Update()

I have made sure that the proper Animator object is being referenced in the script. The animator starts using a single-keyframe animation setting the position of a RectTransform to be above the screen. This transitions to another single-keyframe animation with the transform near the middle of the screen when the SetBool method is called. If I manually enable the boolean value in the Animator GUI, then the transition occurs as expected and the "animation" plays naturally, but not when this is done by a script.

The method call happens and the error above is thrown. The Animator component on the object in question has all defaults except for the controller described above. (Avatar: none; Apply Root Motion: false; Update Mode: normal; Culling Mode: always)

Comment
Add comment · Show 3
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 fffMalzbier · Nov 27, 2015 at 10:36 AM 0
Share

The error "Animator is not playing a Playable" can has multiple causes. The animator component could be disabled or the gameobject / the gameobject in the hirachi could be not active.

avatar image Treyzania fffMalzbier · Nov 27, 2015 at 06:22 PM 0
Share

Everything in the Hierarchy is enabled, and the Animator itself is always active as well.

avatar image dodejayash · Mar 29, 2016 at 05:03 AM 0
Share

Post your code ...!!!

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by meat5000 · Mar 29, 2016 at 12:22 PM

I think a single key does not count as a Playable Animation.

In the past I have had to use at least 2 keys in my animation. Sometimes in order to achieve this I simply duplicated the first frame and then unity behaved normally.

If you create a new Animation Clip in the Animation window you will notice it has a key at 0 and a key at 1s by default.

Comment
Add comment · 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
0

Answer by nicafornica · Mar 29, 2016 at 12:22 PM

this has something to do with prefabs and instances of such. I have the same problem but I do not know how to fix it.

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 nicafornica · Mar 29, 2016 at 02:34 AM 0
Share

Actually I tried something i saw someone do, but with another component ins$$anonymous$$d of an animator.

Basically you have to get the component from the instance. $$anonymous$$y issues was when I was entering a collision, so to fix that here is what I did on my code:

     void OnTriggerEnter2D (Collider2D other)
     {
         if(other.tag == "Bubble")
         {  
             Destroy(other.gameObject, clip.length - 0.1f);
             anim = other.GetComponent<Animator>();
             anim.SetTrigger("Enter");
         }      
     }

Now, I do not know how efficient this is, since we get the component every time I enter the collision, but it is the only way i got it to work.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

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

Related Questions

How can i use the Animator in script to find when animation clip finished playing and then stopping the animation ? 1 Answer

Conflicting Animator SetTrigger 0 Answers

Set boolean to false when animation changes? 1 Answer

pause Animation 0 Answers

Is it possible to always make animations play differently? 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