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

TableEntryReference.ResolveKeyId

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 long ResolveKeyId(SharedTableData sharedData);

Parameters

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

Returns

long The resolved key id, or 0 when the reference cannot be resolved.

Description

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

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

<para>Resolve an entry reference to a stable key id.</para>

using Unity.Localization;

namespace Unity.Localization.Samples { public class TableEntryReferenceResolveKeyIdExample { public long Run(TableEntryReference entryReference, SharedTableData sharedData) => entryReference.ResolveKeyId(sharedData); } }