I’m making a level unlock system using UIButton with the box collider disabled. I am having trouble using NGUI Tools to enable them. Consequently, I am using the above Unity code with mixed results.
I simply want to activate the box collider on the UIButton, enabling it and restoring its color. Am I using SetActiveChildren appropriately?
Is there a better way?
Thank you for any help you might offer.
int n = 0;
for(int i=0; i<maxLevels; i++)
{
if(n <= Misc.getMaxLevel())
{
//NGUITools.SetActiveChildren(planetButton[n], true);
planetButton[n].collider.enabled = true;
Misc.setStartSpawnerIndex(0);
Misc.setStartRound(1);
}else{
//NGUITools.SetActiveChildren(planetButton[n], false);
planetButton[n].collider.enabled = false;
}
n++;
}