기술 자료

Unity Engine

Unity Engine

TableEntryReference.Type

The way a table entry reference identifies its entry.
읽는 시간 1분최근 업데이트: 한 달 전

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.