every time I run:
function Update () {
//Thing1
var Thing1 = Random.Range(1,5);
//turret2
var Thing2 = Random.Range(1,5);
while (Thing2 == Thing){
Random.Range(1,5);
}
Debug.Log ("Thing1: " + Thing1 + "Thing2: " + Thing2);
}
unity freezes. I read that unity freezes from infinite loops. But I cant find why this is infinite? can anyone help?
Also if your feeling generous please check out my other question at: Destroying and not destroying (Not Solved) - Unity Engine - Unity Discussions