Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


implicit operator TableEntryReference

Converts key text into a name-based entry reference.
Read time 1 minuteLast updated 7 days ago

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