I am trying to lad an awd model, that was made with helpo of this guide.
Ive tryed a lot of different examples on loading awd to a project and now my code to load it into my project looks like this:
Parsers.enableAllBundled();
AssetLibrary.enableParser(AWD2Parser);
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
AssetLibrary.loadData(new TheObject());
and the onAssetComplete function:
private function onAssetComplete(event:AssetEvent):void
{
MonsterDebugger.trace("onAssetComplete", event.asset.assetType );
if (event.asset.assetType == AssetType.MESH) {
var staticMesh:Mesh = event.asset as Mesh;
//staticMesh.geometry.scale(7);
_plane.addChild(staticMesh);
}
}
But it loads only Geometry asset type and never mesh or anything else.
Please help me what am I doing wrong& Im trying to do this for about 8 hours already and just can not understand where is my mistake… Thank you!
P.S: Also attached my awd file.