private var folders = new Array();
class Folder {
var ID : int;
var name : String;
var address : String;
var subfolders : Array;
var files : Texture2D[];
var fileCounter : int;
function Folder() {
ID = 0;
name = null;
address = null;
subfolders = new Array();
files = new Texture2D[1000];
fileCounter = 0;
}
}
function ScanResources () {
// here i populate the array
// [...]
}
function Start () {
print (folders[0].name); // <- here i get the error
}
the Print() gives me the error “name is not a member of ‘Object’”.
This worked fine in unity 2.6…
Any idea?
and I think the changes and new power in UnityScripting in U3 came at the price of having to do basic typesafe coding yourself (type casting). It now seems to run on #pragma strict all the time (saves you lot of headache when moving with the code anywhere else than desktop and web, as all other platforms are permanentely in #pragma strict mode)