# GetLocalizedAsset<TObject>(TableReference, TableEntryReference, Locale)

> Resolves a localized asset synchronously from a synchronous provider and entry.

## Definition

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

## GetLocalizedAsset\<T>(TableReference, TableEntryReference, Locale)

```csharp
public TObject GetLocalizedAsset<TObject>(TableReference tableRef, TableEntryReference entryRef, Locale locale = null) where TObject : Object
```

### Parameters

**** (\[TableReference]\(/engine/6000.7/script-reference/unity/localization/tablereference)): The reference to the table collection that holds the entry.**** (\[TableEntryReference]\(/engine/6000.7/script-reference/unity/localization/tableentryreference)): The reference to the entry to resolve within the table.**** (\[Locale]\(/engine/6000.7/script-reference/unity/localization/locale)): The locale to resolve in; null uses the selected locale.

### Returns

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

### Remarks

This is the synchronous companion to [ResourceDatabase.GetLocalizedAssetAsync](/engine/6000.7/script-reference/unity/localization/resourcedatabase/getlocalizedassetasync.md). It resolves the table through a provider that implements [ISynchronousAssetProvider](/engine/6000.7/script-reference/unity/localization/providers/isynchronousassetprovider.md) and loads the asset through an entry that implements [ISynchronousAssetEntry](/engine/6000.7/script-reference/unity/localization/isynchronousassetentry.md), such as a direct reference or a `Resources` load. It returns null when the table or the asset can only be loaded asynchronously and is not already cached.

Reads a localized asset synchronously.

### Examples

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

namespace Unity.Localization.Samples
{
    public class GetLocalizedAssetSyncExample : MonoBehaviour
    {
        void Start()
        {
            // Resolves immediately when the table and asset come from synchronous providers (direct references or Resources).
            Sprite flag = LocalizationSettings.ResourceDatabase.GetLocalizedAsset<Sprite>("UI Assets", "flag");
            Debug.Log(flag != null ? flag.name : "no flag");
        }
    }
}
```
