Hello,
I am new to Unity. And as “soft” landing, I am struggling this error for few days now.
I saw a lot of posts on the subject, but no suggestion fixed that.
I am attaching the screen shot of my scene:
And here is the code for the SwingAnimation.cs script:
using UnityEngine;
using System.Collections;
public class SwingAnimation : MonoBehaviour {
public AnimationClip AttackAnimationClip;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetMouseButton(0))
{
animation.Play(AttackAnimationClip.name);
}
}
}
What is wrong with this??
Thanks in advanced
