Returns null even though the asset exists in the file. What should I do?
Here is the relevant code.
var path = getPath('images/$key.png', IMAGE, library);
//trace(path);
if (OpenFlAssets.exists(path, IMAGE)) {
if(!currentTrackedAssets.exists(path)) {
var newGraphic:FlxGraphic = FlxG.bitmap.add(path, false, path);
newGraphic.persist = true;
currentTrackedAssets.set(path, newGraphic);
}
localTrackedAssets.push(path);
return currentTrackedAssets.get(path);
}
trace(path);
trace(OpenFlAssets.exists(getPath('images/$key.xml', TEXT, library)));
trace('oh no its returning null NOOOO');
return null;
}