Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

After playing an animation, void Update() hangs

$
0
0
Exactly what it says in the title. The following script is giving me all kinds of headaches. The "update works" log stops working after the co-routine "works." Any ideas? void Update() { if (couch.couchClicked == true && animation.isPlaying == false) { animation.Play("Spring"); couch.couchClicked = false; StartCoroutine("SpringReset"); Debug.Log("If statement works"); } Debug.Log("update works"); } IEnumerator SpringReset() { yield return new WaitForSeconds(3f); animation.Rewind("Spring"); Debug.Log("coroutine works"); }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>