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();