c# - Unity vs iOS and for loops not executing the same way? -
i trying produce scrolling list based on how many games user has active. works fine in unity editor reason not working same way when build ios unit?
here doing:
int = 0; debug.log ("1. myturn count: "+myturn.count); list<parseobject> myturnlist = new list<parseobject>(myturn.values); myturnlist.sort((e1,e2) => e1.get<string>("lastmovetime").compareto(e2.get<string>("lastmovetime"))); debug.log ("2. myturnlist count: "+myturnlist.count); for(int x = 0;x <= myturnlist.count;x++){ if(x == myturnlist.count){ activegames[i].setactive(true); moregamesspacer(i); i++; } else { activegames[i].setactive(true); gamelogic(myturnlist[i],i); i++; } }
in unity editor 2 debug.logs comes out number 4, in ios unit comes out zero? in both cases produces list, can see script should produce 4 games before "moregames" in list. in unity correct, on ios "moregames" comes first , games?!?!?
is there missing in regards loops , ios or what?
any appreciated , in advance :-)
Comments
Post a Comment