SharedTableData.SharedTableEntry
A single key in the shared data, pairing the key text with its stable id.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Class
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
public sealed class SharedTableData.SharedTableEntry
Remarks
Each entry carries the key's id, its text, the per-key SharedEntryFlags, and a MetadataCollection shared across every locale. Obtain one from SharedTableData.GetEntry or SharedTableData.AddKey rather than constructing it directly, so the owning SharedTableData keeps its id and key lookups in sync.
Read the id, key, and flags from an entry.
Examples
using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class SharedTableEntryOverviewExample { public void Run() { var sharedData = ScriptableObject.CreateInstance<SharedTableData>(); SharedTableData.SharedTableEntry entry = sharedData.AddKey("GREETING"); entry.IsSmart = true; Debug.Log(entry.Id); Debug.Log(entry.Key); // GREETING Debug.Log(entry.Flags); // Smart } }}