Simple for loop to change QualityLevel

Hi unity community…

Ok so i’m trying to make a GUI than changes the Quality level of the game or project when click and displaying that value.

var qualityLevel = QualitySettings.GetQualityLevel();

function Update(){
guiText.text = "Display : " + qualityLevel; 

function OnGUI(){
var i : int = 0;

for(i=1; i=6; i++);

enter code here

For some reason i keep getting “Expecting =” on the for line.

So any insight to what could be the problem ?


The for loops always need to be a “>”, “<”, “>=” or “<=”, for some reason unknown to me.

So as stated by flamy, it must be

for(var i=0;i<=6;i++)

~ Myhijim