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
0
Question by rhbrr5hrfgdfgw · Jun 13, 2014 at 10:52 AM · animationnew

Cant animate through script

Before the new unity i was able to animate in unity easy, and script it to play the animation.

now i have problems with the new unity, finally i succeed animating an reload animation, but now when i want to play it it says:

The animation state Reload could not be played because it couldn't be found!

Please attach an animation clip with the name 'Reload' or call this function only for existing animations.

i added an animation, dragged the reload to it, and its still saying that error.

info:

in the weapon object i have:

 Animator:,
 
 Controller: M4A3,
 
 Avatar: None,
 
 Apply root motion: checked,
 
 Animate physics: not checked,
 
 Culling mode: always animate,



 Animation:

 Animation: Reload,

 Animations:,

 Size: 1,

 Element 0 : Reload,

 Play automatically: not checked,

 Animate physics: not checked,

 Culling mode: always animate,




The line of code is:

animObj.animation.Play("Reload");

Comment
Add comment · Show 6
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 rhbrr5hrfgdfgw · Jun 13, 2014 at 02:17 PM 0
Share

Can i get help??

avatar image Ben-Stoneman ♦♦ · Jun 13, 2014 at 02:41 PM 0
Share

I would advise that you use a different system for animations. Use $$anonymous$$ecanim and use the code to manage your transitions.

See here: http://answers.unity3d.com/questions/551679/unity-thinks-my-animation-is-not-attached-but-it-i.html

avatar image rhbrr5hrfgdfgw Ben-Stoneman ♦♦ · Jun 13, 2014 at 03:06 PM 0
Share

But i dont understand what to do, also because this is an old game i made (with old version of unity) I got some other weapons that have the same animation system and it works.

avatar image Ben-Stoneman ♦♦ Ben-Stoneman ♦♦ · Jun 13, 2014 at 03:35 PM 0
Share

What version of Unity is this made in?

avatar image rhbrr5hrfgdfgw · Jun 13, 2014 at 03:59 PM 0
Share

if you ask for the version when all worked: end of 3, or start of version 4

if you ask for the version now: its the newest.

also tryed to animate with the new animator(with script) using the unity3d tutorial(just converted it to javascript) and the animation works but its animating at start and also keep animating.

 var anim : Animator;
 var reloadHash = Animator.StringToHash("Reload");
 
 function Start(){
     anim = animObj.GetComponent(Animator);
 }



also i have another line but that line only calls when it automatically reloads:

anim.SetTrigger(reloadHash);

and yes, if you ask i tryed deleting this line, still keeps animating.

And also i used animObj because i call this script from another object.

Edit: after some tests, i deleted all the animator related codes, and its still animating so i think its something much more easier-related to unity

avatar image rhbrr5hrfgdfgw · Jun 13, 2014 at 06:45 PM 0
Share

help?????????????? i noticed its doesn't even related to the code, when i open the game it start looping.

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Animation interference problem 1 Answer

Blender Animation in Unity Problem 0 Answers

FBX file animation problem 0 Answers

How can I get a blender FBX file's animations working in Unity? 0 Answers

How to export MMD model to Unity? 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