| Parameter | Description |
|---|---|
| tableRef | The reference to the table collection that holds the entry. |
| entryRef | The reference to the entry to resolve within the table. |
| locale | The locale to resolve in; null uses the selected locale. |
| enableFallback | Whether to walk the locale fallback chain when the locale has no usable value. |
IResourceEntry The resolved entry, or null when the table is not loaded or no usable value exists.
Resolves an entry synchronously, following the fallback chain, or null when an async load is required.
This is the synchronous companion to ResourceDatabase.GetEntryAsync. It resolves from tables already cached for the
locale, and otherwise loads the table through any provider that implements ISynchronousAssetProvider,
following the Locale.FallbackCode chain. It returns null when the required table can only be loaded
asynchronously and is not already cached.
<para>Reads an entry that is already loaded.</para>
using Unity.Localization; using UnityEngine;
namespace Unity.Localization.Samples { public class GetEntrySyncExample { public void Run() { IResourceEntry entry = LocalizationSettings.ResourceDatabase.GetEntry("UI Text", "hello"); if (entry is IStringEntry stringEntry) Debug.Log(stringEntry.Value); } } }