Seting all bools in a list to false?

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*

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.