ドキュメント

Unity Engine

Unity Engine

implicit operator TableEntryReference

Converts key text into a name-based entry reference.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Operator
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule

implicit operator TableEntryReference(TableEntryReferenc)

Converts key text into a name-based entry reference.
public static implicit operator TableEntryReference(string key)

Parameters

The key text of the entry to reference.

Returns

Type

Description

TableEntryReferenceAn entry reference that identifies the entry by key text.

Remarks

Lets you assign a string wherever a TableEntryReference is expected. The result has a TableEntryReference.ReferenceType of
Name
. An empty or null string produces an empty reference.
Reference an entry by key text through the implicit conversion.

Examples

using Unity.Localization;namespace Unity.Localization.Samples{ public class TableEntryReferenceFromKeyExample { public TableEntryReference Run() => "Menu/Start"; }}

implicit operator TableEntryReference(TableEntryReferenc)

Converts a key id into an id-based entry reference.
public static implicit operator TableEntryReference(long keyId)

Parameters

keyId

The stable key id of the entry to reference.

Returns

Type

Description

TableEntryReferenceAn entry reference that identifies the entry by key id.

Remarks

Lets you assign a long wherever a TableEntryReference is expected. The result has a TableEntryReference.ReferenceType of
Id
. Key ids are stable across key renames.
Reference an entry by key id through the implicit conversion.

Examples

using Unity.Localization;namespace Unity.Localization.Samples{ public class TableEntryReferenceFromKeyIdExample { public TableEntryReference Run() => 12345L; }}