# ResolveKeyId(SharedTableData)

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

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
public long ResolveKeyId(SharedTableData sharedData)
```

### Parameters

**** (\[SharedTableData]\(/engine/6000.7/script-reference/unity/localization/sharedtabledata)): The shared table data to resolve the key against.

### Returns

| Type                                                        | Description                                                        |
| ----------------------------------------------------------- | ------------------------------------------------------------------ |
| [long](https://learn.microsoft.com/dotnet/api/system.int64) | The resolved key id, or `0` when the reference cannot be resolved. |

### Remarks

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`.

Resolve an entry reference to a stable key id.

### Examples

```csharp
using Unity.Localization;

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