“Object reference not set to an instance of an object”?
here is the code:
var SystemAssetList : List.<String>;
function GetList(){
var AssetList : String[];
AssetList=Directory.GetFiles(Application.dataPath+"/Bundles/");
for(i=0;i<AssetList.length;i++){
SystemAssetList.Add(AssetList[i]);
}
}
both vars are type String…why it gives me this error?