GUIStyle Array Not Working! (very simple code!)

This really upsets me. When I declare a 2D GUIStyle array, and use the first column, changes made carry over to the 2nd column. WHY DOES THIS NOT WORK AS IT SHOULD?? My Concept is dependent on accessing all allocated elements of GUIStyle...

public GUIStyle[ ][ ] a = new GUIStyle[5][];
public GUIStyle[ ] b; // 5 Elements set in inspector! AlphaValue is 255!

void Start()
{
    for (int i = 0; i < b.Length; i++)
    {
        a *= new GUIStyle[b.Length];*
 _a *= b;*_
 _*}*_
_*}*_
_*```*_
_*<p>now watch this:</p>*_
_*```*_
_*void OnGUI()*_
_*{*_
 _*GUILayout.BeginArea(new Rect((Screen.width/1.5f)+45, (Screen.width/2)-60, 180, 400)*_
 <em>*if (GUILayout.Button("BUTTON_1", a[0][0]))*</em>
 _*{*_
 _*a[0][0].normal.textColor = Color.white;*_
 _*}*_
 <em>*if (GUILayout.Button("BUTTON_2", a[0][1]))*</em>
 _*{*_
 _*a[0][1].normal.textColor = Color.white;*_
 _*}*_
 _*GUILayout.Space(15);*_
 <em>*if (GUILayout.Button("BUTTON_1", a[1][0]))*</em>
 _*{*_
 _*a[1][0].normal.textColor = Color.white;*_
 _*}*_
 <em>*if (GUILayout.Button("BUTTON_2", a[1][1]))*</em>
 _*{*_
 _*a[1][1].normal.textColor = Color.white;*_
 _*}*_
 _*GUILayout.EndArea();*_
_*}*_
_*```*_
_*<p>The alpha value for all slots is 255.</p>*_
_*<p>The functionality of the above is weird i.e. IT DOESN'T WORK. I click the button for the first slot (column) in the first category (row) and it changes the first button for the second category...wtf. I don't understand why because I am USING DIFFERENT GUISTYLES INDICIES..</p>*_

Chill dude ;-)

You are using shared copies of b in a - so you are not using 25 GUIStyle objects, but only 5.

Simply replace your Start method with the following, and it should work:

void Start()
{
    for (int i = 0; i < b.Length; i++)
    {
        a *= new GUIStyle[b.Length];*
 *for (int j = 0; j < b.Length; j++)*
 *{*
 _a*[j] = new GUIStyle(b[j]);*_
 _*}*_
 _*}*_
_*}*_
_*```*_