Toggle buttons working together

I have 3 toggle buttons to control graphics quality.

To ensure only 1 is active at one time I use the code below:

function OnGUI(){
                qualityLow = GUI.Toggle(Rect(guiTexture.pixelInset.x + 15,(Screen.height - guiTexture.pixelInset.y) - 240, 110, 20), qualityLow, "Low");
		qualityMed = GUI.Toggle(Rect(guiTexture.pixelInset.x + 15,(Screen.height - guiTexture.pixelInset.y) - 220, 110, 20), qualityMed, "Medium");
		qualityHigh = GUI.Toggle(Rect(guiTexture.pixelInset.x + 15,(Screen.height - guiTexture.pixelInset.y) - 200, 110, 20), qualityHigh, "High");
		if(qualityLow == true){
			qualityMed = false;
			qualityHigh = false;
			qualityLevelChange = QualityLevel.Fastest;
		}
		if (qualityMed == true) {
			qualityLow = false;
			qualityHigh = false;
			qualityLevelChange = QualityLevel.Good;
		}
		if (qualityHigh == true) {
			qualityLow = false;
			qualityMed = false;
			qualityLevelChange = QualityLevel.Fantastic;
		}
}

However when I click some toggle buttons it doesnt seem to highlight them and when I click others it seems to select more than 1.

I’m not sure whats going on tbh.

Can anyone help me with this?

Thanks.

I think you can use this instead of a toggle. Selection Grid.

Basically what it does is that you can only have one button clicked at any point of time. And you can change it’s skin to a toggle button so it looks like a toggle but works like a selection grid. :smile: Hope it helps.