Hi I am working with a array of GUIStyles. I am trying to check if the GUIStyle.normal.background at position # is null however I get as error before the check is done
public static void GetSetStyle()
{
GUIStyle[] GUIICOStyle = new GUIStyle[5];
for (int i = 0; i < 5; i++)
{
if (!GUIICOStyle*.normal.background) Debug.Log("it is null");*
}
}
“it is null” is not printed instead i get “NullReferenceException: Object reference not set to an instance of an object”
is there something else in the GUIStyle that needs to be set before I try to access the normal.backgrund ?