I have the following code set out for a simple animation in Unity:
#pragma strict
function Start () {
}
function Update () {
if (Input.GetButtonDown("KeyCode.W")){
animation.Play("dogWalk", WrapMode.Loop);
}
};
Unfortunately, I have no idea what to do with namespaces (since they occasionally pop up as warnings but don't seem to have any purpose), and line 12 (animation.Play("dogWalk", WrapMode.Loop);) keeps generating an error regarding UnityEngine. What does it mean, and how do I fix it?
TL;DR:
What do namespaces do?
What does the error mean and how do I get rid of it?