Meta XR Platform SDK (UPM) v71 Reference Guide
Meta XR Platform SDK (UPM) v71 Reference Guide
Select your platform
No SDKs available
No versions available

AssetFile Class

The Asset File API provides methods for managing asset files in a virtual environment. The methods include getting details and status AssetDetails::DownloadStatus, downloading by ID or name, canceling downloads, and deleting files by ID or name.

Static Methods

Delete ( assetFileID )
DeprecatedUse AssetFile.DeleteById()
Signature
static Request<Models.AssetFileDeleteResult> Oculus.Platform.AssetFile.Delete(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The uuid of the asset file.
DeleteById ( assetFileID )
Removes a previously installed asset file from the device by its ID. Returns an object containing the asset ID and file name, and a success flag.
Signature
static Request<Models.AssetFileDeleteResult> Oculus.Platform.AssetFile.DeleteById(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The asset file ID
DeleteByName ( assetFileName )
Removes a previously installed asset file from the device by its name. Returns an object containing the asset ID and file name, and a success flag.
Signature
static Request<Models.AssetFileDeleteResult> Oculus.Platform.AssetFile.DeleteByName(string assetFileName)
Parameters
assetFileName: string  The asset file name
Download ( assetFileID )
Signature
static Request<Models.AssetFileDownloadResult> Oculus.Platform.AssetFile.Download(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The uuid of the file.
DownloadById ( assetFileID )
Downloads an asset file by its ID on demand. Returns an object containing the asset ID and filepath. Sends periodic Message::MessageType::Notification_AssetFile_DownloadUpdate to track the downloads.
Signature
static Request<Models.AssetFileDownloadResult> Oculus.Platform.AssetFile.DownloadById(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The asset file ID
DownloadByName ( assetFileName )
Downloads an asset file by its name on demand. Returns an object containing the asset ID and filepath. Sends periodic {notifications.asset_file.download_update}} to track the downloads.
Signature
static Request<Models.AssetFileDownloadResult> Oculus.Platform.AssetFile.DownloadByName(string assetFileName)
Parameters
assetFileName: string  The asset file name
DownloadCancel ( assetFileID )
Signature
static Request<Models.AssetFileDownloadCancelResult> Oculus.Platform.AssetFile.DownloadCancel(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The uuid of the asset file.
DownloadCancelById ( assetFileID )
Cancels a previously spawned download request for an asset file by its ID. Returns an object containing the asset ID and file path, and a success flag.
Signature
static Request<Models.AssetFileDownloadCancelResult> Oculus.Platform.AssetFile.DownloadCancelById(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The asset file ID
DownloadCancelByName ( assetFileName )
Cancels a previously spawned download request for an asset file by its name. Returns an object containing the asset ID and file path, and a success flag.
Signature
static Request<Models.AssetFileDownloadCancelResult> Oculus.Platform.AssetFile.DownloadCancelByName(string assetFileName)
Parameters
assetFileName: string  The asset file name
GetList ()
Returns an array of asset details with asset file names and their associated IDs AssetDetails::AssetId, and whether it's currently installed AssetDetails::DownloadStatus.
Signature
static Request<Models.AssetDetailsList> Oculus.Platform.AssetFile.GetList()
SetDownloadUpdateNotificationCallback ( callback )
Sent to indicate download progress for asset files.
Signature
static void Oculus.Platform.AssetFile.SetDownloadUpdateNotificationCallback(Message< Models.AssetFileDownloadUpdate >.Callback callback)
Returns
void
Status ( assetFileID )
DeprecatedUse AssetFile.StatusById()
Signature
static Request<Models.AssetDetails> Oculus.Platform.AssetFile.Status(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The uuid of the asset file.
StatusById ( assetFileID )
Returns the details Models.AssetDetails on a single asset: ID, file name, and whether it's currently installed
Signature
static Request<Models.AssetDetails> Oculus.Platform.AssetFile.StatusById(UInt64 assetFileID)
Parameters
assetFileID: UInt64  The asset file ID
StatusByName ( assetFileName )
Returns the details Models.AssetDetails on a single asset: ID, file name, and whether it's currently installed
Signature
static Request<Models.AssetDetails> Oculus.Platform.AssetFile.StatusByName(string assetFileName)
Parameters
assetFileName: string  The asset file name