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 RedbeardRum · Mar 08, 2011 at 09:24 PM · animationcameraplaymainmenu

Playing animation elements not working

We are animating a camera to move from place to place. We have seven animations created in unity animator which are all applied as elements (element 0 - 6) to an animation component on the camera.

animation.wrapMode = WrapMode.Once;

function Awake() { animation.Play("OpeningtoMainMenu"); }

function MainMenutoBonusContent() { Debug.Log ("script gets here"); animation.Play ("MainMenutoBonusContent"); }

This is our code so far (the rest of the code looks the same with different animation names) Our 1st animation plays no problem (function awake) yet we keep getting the error:-

The animation state MainMenutoBonusContent could not be played because it couldn't be found! Please attach an animation clip with the name 'MainMenutoBonusContent' or call this function only for existing animations.

This exact method has worked for us on previous projects so we do not understand what is going wrong at all? The trigger button is sending a message and the debug log is firing fine. What should we do?

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
0

Answer by AngryOldMan · Mar 08, 2011 at 10:14 PM

Have you perhaps named your animation with an extra space at the end? I think you have and thats the reason when you name your animation in the script it doesn't work. You know what I mean, you know you did it, I'm watching you buddy.

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 RedbeardRum · Mar 08, 2011 at 10:16 PM 1
Share

oh yeah man guess what, this complete plonker did that exact thing. what cheese donkey!

avatar image
0

Answer by shinriyo_twitter · Nov 28, 2011 at 03:11 PM

Once delete prefab and make again.

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

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

1 Person is following this question.

avatar image

Related Questions

Camera Animation On Click Help? 1 Answer

Animation Play Problem (Att: Video Example) 1 Answer

animation play in game over 1 Answer

Camera Pan 1 Answer

Why isn't Cinemachine switching between cameras? 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