Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Unity crashes because of script

$
0
0
hello, i know this is a noobie question but i cant figure it out, i have a loop script and when i try to run it unity crashes. it works fine with everything else its just this script. any help is appreciated #pragma strict var i:int=0; var Prefab:GameObject; var lastUpdate:float=0; function Start () { } function Update () { while(i<10){ print(i); if(Time.time - lastUpdate >= 1f){ lastUpdate = Time.time; i++; Instantiate(Prefab,transform.position,transform.rotation); } } }

Viewing all articles
Browse latest Browse all 2383

Trending Articles



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