# IsLoadingAssetPreview

> Checks whether the preview for a specific asset is still loading, using the asset's instance ID. Prefer AssetPreview.IsLoadingAssetPreview(EntityId).

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **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)](/engine/6000.3/script-reference/unityeditor/assetpreview/isloadingassetpreview.md#isloadingassetpreview\(entityid\)).

```csharp
public static bool IsLoadingAssetPreview(int instanceID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): InstanceID of the asset that a preview was requested for by [AssetPreview.GetAssetPreview](/engine/6000.3/script-reference/unityeditor/assetpreview/getassetpreview.md).

### Returns

| Type                                                          | Description                                                                                                                                   |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | 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.

```csharp
public static bool IsLoadingAssetPreview(EntityId entityId)
```

### Parameters

**** (\[EntityId]\(/engine/6000.3/script-reference/unityengine/entityid)): EntityId of the asset a preview was requested for by [AssetPreview.GetAssetPreview](/engine/6000.3/script-reference/unityeditor/assetpreview/getassetpreview.md). Obtain it by calling Object.GetEntityId() on the same Object you passed to [AssetPreview.GetAssetPreview(Object)](/engine/6000.3/script-reference/unityeditor/assetpreview/getassetpreview.md#getassetpreview\(object\)).

### Returns

| Type                                                          | Description                                                                                                                                   |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | 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. |
