ドキュメント

Unity Engine

Unity Engine

SharedTableData.SharedTableEntry

A single key in the shared data, pairing the key text with its stable id.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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 } }}

Properties

Property

Description

FlagsPer-key flags shared across every locale.
IdThe stable id of the key.
IsSmartWhether the key's string values are Smart Strings.
KeyThe key text.
MetadataMetadata attached to the key across every locale.