x


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?

more ▼

asked Jul 14 '10 at 03:00 PM

Ben 2 gravatar image

Ben 2
473 20 24 41

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).

Jul 14 '10 at 04:24 PM Ben 2

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

Sep 23 '10 at 10:31 AM Matt Maker

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

Nov 20 '10 at 10:19 AM Moayyad yaghi

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

Dec 13 '10 at 04:49 AM zannghast
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Jan 31 '11 at 03:13 PM

angi gravatar image

angi
22 8 8 14

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3780
x222
x104
x82
x63

asked: Jul 14 '10 at 03:00 PM

Seen: 1883 times

Last Updated: Jul 14 '10 at 03:00 PM