Seting all bools in a list to false?

136813-2019-04-22-00-52-56.png
How can i make so whenever i press a button it should set skinList

.activeSkin of a current button to true and the others bool activeSkin values in a list to false.
This works almost like i want but when i press the button again skinList[c].activeSkin of a current button becomes false wich is not what i want.

  

I’m not sure if I entirely follow your code, but I would do something like the following:

for(int c = 0; c < bttn.Length; c++){

 if( button of index c is pressed){
     for(int i = 0; i < bttn.Length; i++){
        if( c == i){
             skinList*.activeSkin = true*

}else{
skinList*.activeSkin = false;*
}
}
}
I think the problem with your code is that you weren’t setting the minButtonNum in the code, but personally I would have rewritten it to my way.