Hoping someone can see what is wrong here I’m new to unity so its probably something very simple but I made an axe on blender and added a swing animation when I added it to unity it works when I have it on play automatically but I want to have it when the mouse is clicked it swings,
heres what I have
using UnityEngine;
using System.Collections;
public class swingaxe : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown (0))
{
animation.Play(“Cube|CubeAction”);
}
}
}
I’ve google’d about a bit to try and find something that works but no luck.