Hello, I'm writing a game using strict javascript in unity3d (#pragma strict), I wrote the code below in the Start function, but it reports error
#pragma strict
function Start () {
// Make all animations in this character play at half speed
for ( var state : AnimationState in animation ) {
state.speed = 0.5;
}
}
The compile error is:
BCE0022: Cannot convert 'Object' to 'UnityEngine.AnimationState'.
What should I do?