• 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 Ben 2 · Jul 14, 2010 at 03:00 PM · animationanimationsanimationclipanimateclip

Can't Play Animation Clip When More Than One Clip Is Added To Animation

I've got a script that plays an animation clip based on input from the user. The heart of the script is simply:

animation.Play(value, PlayMode.StopSameLayer)

Where value is just the name of the clip. This worked fine when there was only one clip in the animation but after I added two more clips, the animation no longer plays. I've verified this code is getting called, I've verified the input string is correct, and I verified all the clips are on the animation object and that the animation is added to the correct object. I'm not sure what else to try. I can run the animation in the Animation Editor and it works fine but when using animation.Play(...) it appears to not be able to find it. Anyone seen something like this before? What might I be doing wrong?

Comment
Add comment · Show 4
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 Ben 2 · Jul 14, 2010 at 04:24 PM 0
Share

I reverted the scene, kept the animations, and reconfigured the gameobject to have just the one animation which is how it was working previously but it still doesn't play when using Animation.Play() so I'm thinking its specific to the new clip(s).

avatar image Matt Maker · Sep 23, 2010 at 10:31 AM 0
Share

maybe show us more of the code, in case we see an issue there?

avatar image Moayyad yaghi · Nov 20, 2010 at 10:19 AM 0
Share

i'm having exactly the same problem . if you guys have any solution . please help .

avatar image zannghast · Dec 13, 2010 at 04:49 AM 0
Share

How did you add the new clip? Did you edit the original animation clip, like say, 'split' it into several different ones?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by angi · Jan 31, 2011 at 03:13 PM

I had the same problem and wondered why it wasn't working... You have to define your clips in your fbx (as you did), after that click on the object containing the animations in the hierarchy view. There you can set the animation size and add your clips. Hope that helps

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Addititive Animation Not Responding to Speed 1 Answer

How to get an AnimationClip to play backwards via script? 1 Answer

Mirroring animation clip without mirroring root motion node? 0 Answers

Walking Animation Feet Shimmy When Key Unpress 1 Answer

I Need The Help Or Advice Of A Unity Animation Expert 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges