Constructors constructor new Asset Reference ( uri , hash ? , asset ? ) : AssetReference Parameters uri : string Optional
hash : string asset : any = null Accessors asset get asset( ) : any Returns any set asset( val ) : void Returns void raw Asset get rawAsset( ) : any Returns any uri get uri( ) : string Returns string Methods begin Listen Download begin Listen Download ( evt ) : void Returns void end Listen Download end Listen Download ( evt ) : void Returns void instantiate instantiate ( parent ? ) : Promise < IGameObject > Returns Promise < IGameObject > instantiate Synced instantiate Synced ( parent ? , saveOnServer ? ) : Promise < IGameObject > Parameters Optional
parent : any saveOnServer : boolean = true Returns Promise < IGameObject > load Asset Async load Asset Async ( prog ? ) : Promise < any > Parameters Optional
prog : ProgressCallback unload unload ( ) : void Returns void Static
get Or Create get Or Create ( sourceId , url , context ? ) : AssetReference Parameters sourceId : string | IComponent url : string Optional
context : Context
Get an AssetReference for a URL to be easily loaded. AssetReferences are cached so calling this method multiple times with the same arguments will always return the same AssetReference.