# HasAsset()

> Returns whether this entry has an asset assigned.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
bool HasAsset()
```

### Returns

| Type                                                          | Description                                           |
| ------------------------------------------------------------- | ----------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` when an asset is assigned; otherwise, `false`. |

### Remarks

Tests the stored reference without loading anything, so it is cheap to call before resolving the asset.

Additional Resources: [IAssetEntry.ReleaseAsset](/engine/6000.7/script-reference/unity/localization/iassetentry/releaseasset.md)

Skip the load when the entry has no asset.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class IAssetEntryHasAssetExample
    {
        public void Run()
        {
            var entry = new ResourceAssetEntry();
            Debug.Log(entry.HasAsset());  // False: no path set

            entry.Default = "UI/banner";  // a path under a Resources folder
            Debug.Log(entry.HasAsset());  // True
        }
    }
}
```
