# GetLocalizedAsset()

> Resolves the localized asset synchronously when a synchronous provider and entry can supply it.

## Definition

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

```csharp
public TObject GetLocalizedAsset()
```

### Returns

| Type | Description                                                           |
| ---- | --------------------------------------------------------------------- |
| T    | The resolved asset, or null when it cannot be resolved synchronously. |

### Remarks

Resolves the asset as `TObject` through providers and entries that support synchronous loading, such as direct references or a `Resources` load. The result is null when the reference is empty, no resource database is configured, or the asset can only be loaded asynchronously and is not already cached. Use [LocalizedAsset\<TObject>.GetLocalizedAssetAsync()](/engine/6000.7/script-reference/unity/localization/localizedasset1/getlocalizedassetasync.md) to load asynchronously instead.

Read a localized asset synchronously.

### Examples

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

namespace Unity.Localization.Samples
{
    public class LocalizedAssetSyncExample
    {
        public Texture Load()
        {
            var localizedTexture = new LocalizedTexture();
            localizedTexture.SetReference("My Assets", "ICON");
            // Resolves immediately when the asset comes from a synchronous provider (a direct reference or Resources).
            return localizedTexture.GetLocalizedAsset();
        }
    }
}
```
