IReadOnlyList<DragAssetData> Assets { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Assets property of the Editor.DragData class provides a read-only list of Editor.DragAssetData objects. This list is generated by interpreting the Text property of the DragData as a collection of asset paths or cloud asset URLs. The property is designed to facilitate access to each asset through helper objects, and it is generated and cached internally upon the first access after any changes to the Text property.

Usage

To use the Assets property, ensure that the Text property of the DragData instance contains valid asset paths or URLs. Accessing the Assets property will automatically parse the Text and provide a list of DragAssetData objects, which can be used to interact with the assets.

Example

// Example of accessing the Assets property
Editor.DragData dragData = new Editor.DragData();
dragData.Text = "path/to/asset1;path/to/asset2";

// Access the Assets property
IReadOnlyList<Editor.DragAssetData> assets = dragData.Assets;

// Iterate over the assets
foreach (var asset in assets)
{
    // Use asset helper methods
    Console.WriteLine(asset.Path);
}