|
Has anyone got a sample script for using an animation created by the Animation Editor? I'm very new to scripting, my previous script that works with imported animations doesn't function with Unity ones and I can't figure out what I'm doing wrong from the docs. A sample script of a simple animation triggered by the FPC would help enormously.
(comments are locked)
|
|
Since AnimationClips are the same no matter if they were created inside Unity or not, the problem is likely somewhere else. Please make sure that the AnimationClip in question is actually in the Animations list of the Animation component on the GameObject you want to animate.
If you want general advise on how to do animation scripting in Unity, these are the must-see resources:
Yes the clip is in the Animations component. I cannot find a single complete script anywhere for triggering an animation and no one seems to be able to give me other than very general information that I already know but doesn't tell me how to put a script together correctly. A few samples of scripts for triggering Unity animations would help me, and the others on the forum with the same problems, figure out what to do. The script reference just gives you isolated bits of information, no examples of a correct complete script that you can study.
Nov 15 '09 at 09:03 PM
Davies
I added links in my answer to resources with plenty of example scripts of how to trigger animations, and other things, including complete examples.
Nov 16 '09 at 09:11 AM
runevision ♦♦
(comments are locked)
|
|
It was a problem within the animation itself. Not the script. Which was weird for me as it's the scripting I have problems with. Anyway, rebuilt the animation and it all worked fine. Thanks.
(comments are locked)
|
|
Thanks also for the additional links. I shall look into them. Cheers
(comments are locked)
|
