IsLoadingAssetPreview
Checks whether the preview for a specific asset is still loading, using the asset's instance ID. Prefer AssetPreview.IsLoadingAssetPreview(EntityId).
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
IsLoadingAssetPreview(int)
Checks whether the preview for a specific asset is still loading, using the asset's instance ID. Prefer AssetPreview.IsLoadingAssetPreview(EntityId).
public static bool IsLoadingAssetPreview(int instanceID)
Parameters
InstanceID of the asset that a preview was requested for by AssetPreview.GetAssetPreview.
Returns
Type | Description |
|---|---|
| bool | True if the preview for the asset is still loading. Returns false once it has finished loading, or if no preview was requested for the asset. |
IsLoadingAssetPreview(EntityId)
Checks whether the preview for a specific asset is still loading. Previews load asynchronously, so poll this and repaint when it finishes.
public static bool IsLoadingAssetPreview(EntityId entityId)
Parameters
EntityId of the asset a preview was requested for by AssetPreview.GetAssetPreview. Obtain it by calling Object.GetEntityId() on the same Object you passed to AssetPreview.GetAssetPreview(Object).
Returns
Type | Description |
|---|---|
| bool | True if the preview for the asset is still loading. Returns false once it has finished loading, or if no preview was requested for the asset. |