DragAssetDataclass

Represents an asset being dragged into an editor window. Assets will either be sourced from a package (see `Editor.DragAssetData.PackageIdent`) or a local path (see `Editor.DragAssetData.AssetPath`). Instances of this type are accessed through `Editor.DragData.Assets`.

objectDragAssetData
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.DragAssetData

Methods2

Showing 2 methods

public System.Threading.Tasks.Task`1<Editor.Asset> GetAssetAsync()PUBLIC

Completes when the asset is ready to use. For cloud assets, the first call to this will start downloading and installing the source package. This is safe to call multiple times, the same task will be returned.

Returns:Task<Asset>

public System.Threading.Tasks.Task`1<Sandbox.Package> GetPackageAsync()PUBLIC

For package assets, completes when the source package information is available.

Returns:Task<Package>

Properties4

Showing 4 properties

public string Editor.DragAssetData.AssetPath { get; set; }PUBLICGETSET

For local assets, the path to the asset. Equivalent to `Editor.Asset.Path`.

Returns:string

public float Editor.DragAssetData.DownloadProgress { get; set; }PUBLICGETSET

For cloud assets, a value between `0.0` and `1.0` representing download progress. Download will only start after the first call to `Editor.DragAssetData.GetAssetAsync`.

Returns:float

public bool Editor.DragAssetData.IsInstalled { get; set; }PUBLICGETSET

True when the asset is ready for use locally. For cloud assets, download will only start after the first call to `Editor.DragAssetData.GetAssetAsync`.

Returns:bool

public string Editor.DragAssetData.PackageIdent { get; set; }PUBLICGETSET

For package assets, the identifier of the source package. Will always be of the form `org.package[#version]`.

Returns:string

On this page