Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

while stops script after looping 1 time

$
0
0
Hi guys, it seems that my script get stopped, when the while loop dont loop and instead just runs one time. Here's my code: int count = 0; int repetitions = Random.Range(1,4); while(!(count == repetitions)) { yield return new WaitForSeconds (0.5f); count += 1 ; } If the repetitions int gets 1 the script breaks after the loop, unity still works! Please help me need your support :D THX

Viewing all articles
Browse latest Browse all 184

Trending Articles



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