Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

TableEntryReference.ResolveKeyName

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public string ResolveKeyName(SharedTableData sharedData);

Parameters

Parameter Description
sharedData The shared table data to resolve the key against.

Returns

string The resolved key text, or null when the reference cannot be resolved.

Description

Resolves this reference to a key name using the given shared table data.

When the reference already holds key text, that text is returned directly. When it holds a key id, the name is looked up in sharedData. Returns null when the reference is empty, or when the id is not present in sharedData.

<para>Resolve an entry reference to its human-readable key text.</para>

using Unity.Localization;

namespace Unity.Localization.Samples { public class TableEntryReferenceResolveKeyNameExample { public string Run(TableEntryReference entryReference, SharedTableData sharedData) => entryReference.ResolveKeyName(sharedData); } }