ResourceDependency represents the data required to load, parse and resolve additional files ("dependencies") required by a parser, used by ResourceLoadSession.

Constructor

@:value({ suppressAsset3DEvents : false, retrieveAsRawData : false })new(id:String, req:URLRequest, data:Dynamic, parentParser:ParserBase, retrieveAsRawData:Bool = false, suppressAsset3DEvents:Bool = false)

Variables

read onlyassets:Vector<IAsset>

read onlydata:Dynamic

The data containing the dependency to be parsed, if the resource was already loaded.

read onlyid:String

read onlyparentParser:ParserBase

The parser which is dependent on this ResourceDependency object.

read onlyrequest:URLRequest

read onlyretrieveAsRawData:Bool

read onlysuppresAsset3DEvents:Bool

Methods

resolve():Void

Resolve the dependency when it's loaded with the parent parser. For example, a dependency containing an ImageResource would be assigned to a Mesh instance as a BitmapMaterial, a scene graph object would be added to its intended parent. The dependency should be a member of the dependencies property.

resolveFailure():Void

Resolve a dependency failure. For example, map loading failure from a 3d file

resolveName(asset:IAsset):String

Resolve the dependencies name