# IAssetEntry

> Represents a resource entry whose localized value is an asset that the entry loads and releases itself.

## Definition

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

```csharp
public interface IAssetEntry : IResourceEntry
```

## Remarks

Each concrete kind owns how its asset is referenced and resolved: [AssetEntry](/engine/6000.7/script-reference/unity/localization/assetentry.md) keeps a direct object reference, [ResourceAssetEntry](/engine/6000.7/script-reference/unity/localization/resourceassetentry.md) stores a `Resources` path, and a package can add other kinds such as an Addressables-backed entry. An entry opts into loading by implementing [IAsyncAssetEntry](/engine/6000.7/script-reference/unity/localization/iasyncassetentry.md), [ISynchronousAssetEntry](/engine/6000.7/script-reference/unity/localization/isynchronousassetentry.md), or both; the localization system prefers the asynchronous version and falls back to the synchronous one. Every loaded asset should be handed back with [IAssetEntry.ReleaseAsset](/engine/6000.7/script-reference/unity/localization/iassetentry/releaseasset.md) so the owning kind can free it. Fetch an asset entry from a table with [ResourceTable.GetEntry](/engine/6000.7/script-reference/unity/localization/resourcetable/getentry.md) using [IAssetEntry](/engine/6000.7/script-reference/unity/localization/iassetentry.md) as the type argument.

Additional Resources: [AssetEntry](/engine/6000.7/script-reference/unity/localization/assetentry.md), [ResourceAssetEntry](/engine/6000.7/script-reference/unity/localization/resourceassetentry.md), [AssetEntryBase\<TStore>](/engine/6000.7/script-reference/unity/localization/assetentrybase1.md), [IAsyncAssetEntry](/engine/6000.7/script-reference/unity/localization/iasyncassetentry.md), [ISynchronousAssetEntry](/engine/6000.7/script-reference/unity/localization/isynchronousassetentry.md)

Check whether an asset entry has a value assigned.

## Examples

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

namespace Unity.Localization.Samples
{
    public class IAssetEntryOverviewExample
    {
        public void Run()
        {
            var shared = ScriptableObject.CreateInstance<SharedTableData>();
            shared.TableCollectionName = "UI Assets";

            var table = ScriptableObject.CreateInstance<ResourceTable>();
            table.SharedData = shared;
            table.LocaleIdentifier = new LocaleIdentifier("en");

            table.AddEntry(new AssetEntry(shared.AddKey("icon").Id));
            IAssetEntry entry = table.GetEntry<IAssetEntry>("icon");

            Debug.Log(entry.HasAsset());  // False: no asset assigned yet
        }
    }
}
```

## Methods

| Method                                                                                         | Description                                       |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [HasAsset](/engine/6000.7/script-reference/unity/localization/iassetentry/hasasset.md)         | Returns whether this entry has an asset assigned. |
| [ReleaseAsset](/engine/6000.7/script-reference/unity/localization/iassetentry/releaseasset.md) | Releases an asset previously returned by a load.  |

## Inheritance

**Inherited Members:**

* [IResourceEntry.KeyId()](/engine/6000.7/script-reference/unity/localization/iresourceentry/keyid.md)
* [IResourceEntry.Metadata()](/engine/6000.7/script-reference/unity/localization/iresourceentry/metadata.md)
* [IResourceEntry.Table()](/engine/6000.7/script-reference/unity/localization/iresourceentry/table.md)
* [IResourceEntry.SharedEntry()](/engine/6000.7/script-reference/unity/localization/iresourceentry/sharedentry.md)
