# RemoveKey(string)

> Removes a key from the shared data.

## Definition

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

```csharp
public void RemoveKey(string key)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The key to remove.

### Remarks

This removes the key from the shared key table only. The per-locale [ResourceTable](/engine/6000.7/script-reference/unity/localization/resourcetable.md) entries for the key are left untouched, so remove the key from the shared data and every locale table together to avoid orphaning translations. Does nothing when the key is absent.

Additional Resources: [SharedTableData.AddKey](/engine/6000.7/script-reference/unity/localization/sharedtabledata/addkey.md), [SharedTableData.Clear](/engine/6000.7/script-reference/unity/localization/sharedtabledata/clear.md)

Remove a single key from the shared data.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class SharedTableDataRemoveKeyExample
    {
        public void Run()
        {
            var sharedData = ScriptableObject.CreateInstance<SharedTableData>();
            sharedData.AddKey("GREETING");

            sharedData.RemoveKey("GREETING");

            Debug.Log(sharedData.GetEntry("GREETING") == null);   // True
        }
    }
}
```
