float DownloadProgress { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The DownloadProgress property provides a floating-point value between 0.0 and 1.0 that indicates the progress of downloading a cloud asset. This property is particularly useful for tracking the download status of assets that are being fetched from a cloud source. The download process is initiated only after the first invocation of the GetAssetAsync method.

Usage

To use the DownloadProgress property, ensure that you have initiated the download by calling the GetAssetAsync method on an instance of DragAssetData. You can then access the DownloadProgress property to monitor the progress of the download.

Example

// Assume dragAssetData is an instance of Editor.DragAssetData

// Start the download process
await dragAssetData.GetAssetAsync();

// Check the download progress
float progress = dragAssetData.DownloadProgress;

// Output the progress
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use a UI element or logging system to display the progress
Debug.Log($"Download Progress: {progress * 100}%");