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 |
|---|---|
| TableEntryReference | An 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 . An empty or null string produces an empty reference.
NameReference 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
The stable key id of the entry to reference.
Returns
Type | Description |
|---|---|
| TableEntryReference | An 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 . Key ids are stable across key renames.
IdReference an entry by key id through the implicit conversion.
Examples
using Unity.Localization;namespace Unity.Localization.Samples{ public class TableEntryReferenceFromKeyIdExample { public TableEntryReference Run() => 12345L; }}