I have a static array, and every time I check the length of it - It throws a NullReferenceException. But when I don’t make it static - it works fine.
I need this array to be static as it’s used to hold player data throughout scenes as a reference holder.
Any ideas why static/non static is affecting the length?
I’m literally just doing:
static var myArray : String[];
print(myArray.length);
//prints Null Reference
var myArray : String[];
print(myArray.length);
//prints the actual size ... which is zero at this time
Thanks.