- Home /
Problem does not exist anymore as I'm using Windows 7, and no answers
Error after Windows XP SP3 uninstall
Hi Eyverone...
I just uninstalled SP3 for XP and reinstalled an earlier version of SP3 (Due to ATI problems) and now my Unity3D gives me errors I did not receive before.
I uninstalled and reinstalled Unity, and reloaded my project but now get this error:
InvalidCastException: Cannot cast from source type to destination type. Powerup.Update () (at Assets/Standard Assets/Character Controllers/Sources/Scripts/Powerup.js:25)
Please see the Script below: The Line 25 which the error refers to is the "StopCoroutine" line. Please help! :(
var PowerUp : String = "PowerUp"; var PowerUpLoop : String = "PowerUpLoop";
function COPowerUp() { var state : AnimationState = animation[PowerUp];
state.wrapMode = WrapMode.Once;
state.speed = 1.0;
animation.Play(PowerUp);
yield new WaitForSeconds(state.length);
animation.Play(PowerUpLoop);
}
function Update () { var horizontal = Input.GetAxis("Horizontal"); var vertical = Input.GetAxis("Vertical");
if (Input.GetButtonDown("Power Up")) { StartCoroutine(COPowerUp()); }
if (Input.GetButtonUp("Power Up")){ animation.Stop(PowerUpLoop); StopCoroutine(COPowerUp()); }
}
Follow this Question
Related Questions
Spawning objects with random sizes and random seperation 1 Answer
Passing System.Exception to JNI 0 Answers
UnassignedReferenceException 0 Answers
InvalidCastException 3 Answers
callback for unhandled exceptions? 3 Answers