Так. Вот что стало известно. Анимация по сути работает, но мне кажется что она распространяется только на ту кость которую я указал, а не на всю ветвь. Как можно сделать чтобы использовалась ветвь костей?
Код переписал:
using UnityEngine;
using System.Collections;
public class WeaponAnimation : MonoBehaviour {
public AnimationClip idle;
public Transform spine;
private void SetupGunAnimation (AnimationClip animationClip) {
AnimationState a = animation[animationClip.name];
a.wrapMode = WrapMode.Loop;
a.layer = 1;
a.AddMixingTransform(spine);
}
public void Start () {
SetupGunAnimation(idle);
animation.CrossFade(idle.name);
}
public void Update () {
}
}