Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by omatase · Sep 17, 2014 at 05:08 AM · animationuimecanim

Mecanim animation auto playing when "Play Automatically" not checked?

I have an anim I made using Unity's animation tools. The animation changes the Y value of the rect transform to move a UIPanel down. The animation plays fine, but I can't get it to stop playing automatically. I have "Play Automatically" unchecked, is there another place to look if my animation is playing automatically when the scene loads?

Here are my settings:

alt text

capture.jpg (37.4 kB)
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by mcroswell · Sep 17, 2014 at 05:56 AM

So, the simple answer is below, but first read this...

Unity uses two basic ways to do animation. The old way was that you put the Animat*ion component into the object you wanted to animate. For complex systems you'd blend and mix Animation Clips in code. The new way is to put an Animator* Component and it references the Animation Clip.

Now, it is typical to use the Animation with Clip(s) by itself or the Animator with Controller, but not both.

For now, just check off the Animation component and try it. You can double click on the Animator Controller PanelSearchingForMatch and see if the transitions are set up how you expect. Notice the Animator Controller would use the animation clip ShowSearchingForMatch.

The other option would be just to use the Animation component by itself. Uncheck or remove the Animator Controller component.

Either way, you should go find your Animation (not the Animator Controller) in the Project View. Click on it and uncheck the loop. Here's one I did (just an elevator that goes up and stops):

alt text

Finally, there are times when it does make sense to have say an Animation component in a child game object. But, for most cases it really makes sense to use just the Animator Controller and have it reference all the Animations and not use the Animation component explicitly. Or use the Animation component by itself (the old legacy way) and switch clips. I suggest not using both approaches in the same game object.


upelevatoranimation.png (40.8 kB)
Comment
Add comment · Show 2 · 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 omatase · Sep 17, 2014 at 06:38 PM 1
Share

Fantastic @mcroswell. Thank you for going above and beyond by explaining the differences between animation and animator (something that has been really confusing to me in all of the videos I've watched), which is newer, how I could use either and which is best to use. I now have this working as expected.

avatar image mcroswell · Sep 17, 2014 at 09:17 PM 0
Share

You're welcome @omatase. Unity really needs a write-up on this since it is kind of history-based reasoning. I has another motivation to help you to: I am, yet again, editing my Animation and $$anonymous$$ecanim chapters in a book, and needed to get refreshed. So...

Thank you, too,

-$$anonymous$$ike

avatar image
0

Answer by Leslie-Young · Oct 30, 2014 at 09:14 PM

I created an empty state and made it default (right-click on state for option) so that the animation do not auto-play. I named it "Idle".

When I need to play the animation I created I simply call Animator.Play with the name of the state that has that clip. To stop the animation I call Animator.Play("Idle");

alt text


animation.png (13.3 kB)
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 sergiobd · Sep 02, 2015 at 10:18 PM 0
Share

Thank you so much Leslie. I spend like an hour looking for this answer. I think the documentation is not explicit enough on this subject...

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

25 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

Related Questions

Add more bones to skeleton - vertebraes definition...? 0 Answers

Mecanim Animate Physics - When to use? 0 Answers

Tweaking a Walk Cycle 0 Answers

Mecanim animation clip mask 1 Answer

why playing animation resets object's transform in Mecanim? 1 Answer


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