- Home /
Are Clips from "AddClip" not editable?
I am trying to split out animations and tweak their individual settings (see code below for split/save). The issue is that the newly saved clip's:
Think that they are still 35 frames in length (the length of the original un-broken animation clip)
Can't be edited in the Animation window
I am by no means an animation artist, and the guy who created the models hasn't gotten back to me so I am forced to tweak settings on my own. My end goal here is to split out the jump animation into three new clips: A jump start, hand, and end, which will then be used for a dynamic jump mechanism in my game (fancy way of saying the longer you hold the key, the higher you jump
Code
animation.AddClip(jumpAnimation,"JumpStart",09,12,false);
animation.AddClip(jumpAnimation,"JumpHang",13,16,true);
animation.AddClip(jumpAnimation,"JumpEnd",25,35,false);
AssetDatabase.CreateAsset(animation["JumpStart"].clip, "Assets/Custom Animations/JumpStart.anim");
AssetDatabase.CreateAsset(animation["JumpHang"].clip, "Assets/Custom Animations/JumpHang.anim");
AssetDatabase.CreateAsset(animation["JumpEnd"].clip, "Assets/Custom Animations/JumpEnd.anim");
AssetDatabase.SaveAssets();
Answer by Guidez · May 25, 2013 at 04:46 AM
I did not realize it, but you can "Split" Animations directly from the imported model.
Import your model with animations
Click the model in the project list
In the Inspector, click the "Animations" tab/button
There will be a "Clips" section where you can click +/- to add/remove animations respectively.
A bit further below, you can rename the animation clip you are creating and tweak the in-out points
This correctly makes separate clips of your animations, which you can further duplicate (if they are Read-Only) and tweak as needed.
Your answer
![](https://koobas.hobune.stream/wayback/20220613102859im_/https://answers.unity.com/themes/thub/images/avi.jpg)