For some reason if a string is blank in a String array requesting it’s length will shoot a null error which causes it to exit the program loop messing everything up
Example
var AttributeNames[] : String[];
AttributeNames = new String[39];
Debug.Log("length is "+AttributeNames[0].length);
I’ve tried using Length instead of length no difference. I tried to also check to see if its blank
e.g.
if(AttributeNames[0]!="")
{
Debug.Log("length is "+AttributeNames[0].length);
}
But for some reason it bypasses that and thinks that the string is not blank. is there an alternate way to check if a string is blank without using length or !=“” ?
I didn’t have this problem at all until i upgraded to unity 3.3
Thanks.