Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

creating a list of bools in OnInspectorGUI()

$
0
0
the bool never applys and I cannot tick the box
Code (CSharp):
  1.  
  2.             int index = 0;
  3.             foreach(var Attack in AD.Attacks.Values)
  4.             {
  5.                 GUILayout.Label(Attack.AttackName);
  6.                 index++;
  7.             }
  8.             bool[] Attacks = new bool[index];
  9.             for(int i = 0 ; i < index ; i++)
  10.             {
  11.                 Attacks[i] = GUILayout.Toggle (Attacks[i], "");
  12.             }

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>