At the start of my C# script I have defined all of these variables as animations
public class Animations : MonoBehaviour {
//Fist Animations
public Animation LeftPunch = null;
public Animation RightPunch = null;
public Animation Idle = null;
public Animation RaiseFist = null;
public Animation LowerFists = null;
public string CurrentWeapon = null;
private bool FistRaised = false;
// Use this for initialization
void Start () {
LeftPunch.wrapMode = WrapMode.Once;
RightPunch.wrapMode = WrapMode.Once;
RaiseFist.wrapMode = WrapMode.ClampForever;
FistRaised = false;
}
// Update is called once per frame
void Update () {
if(CurrentWeapon == "Fists"){
if(FistRaised == false){
RaiseFist.Play();
FistRaised = true;
}
if(Input.GetMouseButtonDown(0)){
LeftPunch.Play();
}
if(Input.GetMouseButtonDown(1)){
RightPunch.Play();
}
}
When I attach this script to the player controller, or the arms model I made the animation with, I cannot drag the animations I made into their spots. It shows the circle with the slash through it.
^ Those spots. I used blender to make the animations, and I did the all-animations-in-one-file and split them according to frames. Why won’t it let me use my animations? Ever since I started my project I’ve had nothing but error after error with animations, and once I actually get them to export it won’t even load them.
What am I doing wrong?