I have made this quick script, to crossfade an animation with my walk and run animations.
But it comes up with a weird error saying:
There are inconsistent line endings in the ‘Assets/attackscript.js’
script. Some are Mac OS X (UNIX) and
some are Windows. This might lead to
incorrect line numbers in stacktraces
and compiler errors. Unitron and other
text editors can fix this using
Convert Line Endings menu commands.
My script is:
function Update () {
animation["my_animation"]. layer = 1;
if(Input.GetMouseButtonDown(0))
animation.CrossFade("my_animation");
}
What am I doing wrong to get this error?
Thanks,
Sorry to undelete this. I had written the answer then found out when I tried posting it that you deleted the question. Its a good question so I left it up for others to see.
– Peter_G