Get the cut animation clip from the model and modify the animated events that are set up:
1. The animation model suffix is. FBX. In Unity3d, you can display animations in FBX. To load the animationclip in the model, just Assetdatabase.loadassetsatpath (fbxpath,typeof (Animationclip)) is OK.
This loads the animation in the FBX.
void Animload (String fbxpath)
{
Animationclip clip = Assetdatabase.loadassetatpath (Fbxpath, typeof (Animationclip)) as Animationclip;
}
2. Want to load FBX multiple animationclip in the cut. Now that we know the types contained in the FBX we can all load, then we all load it up and get the type we want in the traversal:
void Animload (String fbxpath)
{
object[] Objs = Assetdatabase.loadallassetsatpath (Fbxpath);
foreach (Object o in Objs)
{
If (O is Animationclip)
{
Debug.Log (O.name + "is clip");
}
}
}
3. I want to manipulate other information in Animationclip, you can use animationutility
void Animoperation (Animationclip clip)
{
Animationevent[] EVs = animationutility.getanimationevents (clip);
foreach (Animationevent e in EVs)
{
Debug.Log ("Do something");
}
}