Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TableEntryReference.Type

The way a table entry reference identifies its entry.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Enum
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public enum TableEntryReference.Type

Remarks

A TableEntryReference stores either a key name or a numeric key id, and this enumeration reports which form is present. Read it from TableEntryReference.ReferenceType; the value is derived from the stored data rather than set directly.
Empty
indicates the reference points at no entry.
Branch on how an entry reference identifies its entry.

Examples

using Unity.Localization;namespace Unity.Localization.Samples{ public class TableEntryReferenceTypeSwitchExample { public void Run() { TableEntryReference entry = "Menu/Start"; switch (entry.ReferenceType) { case TableEntryReference.Type.Name: /* look up by key text */ break; case TableEntryReference.Type.Id: /* look up by key id */ break; case TableEntryReference.Type.Empty: /* no entry */ break; } } }}

Fields

Value

Description

EmptyThis reference points at no table entry.
IdThe entry is referenced by its stable key id.
NameThe entry is referenced by its key text.