Provides a reference to a remote asset (i.e. assets outside of the Lens size limit) that can be downloaded at runtime using script.
//@input Asset.RemoteReferenceAsset myRemoteReferenceAsset//@input Component.AudioComponent myAudioComponentfunction onFailed() { print("Asset wasn't downloaded from the reference " + script.myRemoteReferenceAsset.name);}function previewDownloadedAsset(asset) { if (asset.isOfType("Asset.AudioTrackAsset")) { script.myAudioComponent.audioTrack = asset; script.myAudioComponent.play(1); } else { print("Warning, asset has type " + asset.getTypeName() + ", please set Audio Component input to display"); }}script.myRemoteReferenceAsset.downloadAsset(previewDownloadedAsset, onFailed); Copy
//@input Asset.RemoteReferenceAsset myRemoteReferenceAsset//@input Component.AudioComponent myAudioComponentfunction onFailed() { print("Asset wasn't downloaded from the reference " + script.myRemoteReferenceAsset.name);}function previewDownloadedAsset(asset) { if (asset.isOfType("Asset.AudioTrackAsset")) { script.myAudioComponent.audioTrack = asset; script.myAudioComponent.play(1); } else { print("Warning, asset has type " + asset.getTypeName() + ", please set Audio Component input to display"); }}script.myRemoteReferenceAsset.downloadAsset(previewDownloadedAsset, onFailed);
The name of the Asset in Lens Studio.
Readonly
Request to download the Remote Reference Asset.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
other
Provides a reference to a remote asset (i.e. assets outside of the Lens size limit) that can be downloaded at runtime using script.
Example