# Clear()

> Removes every 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 Clear()
```

### Remarks

This clears the shared key table only. The entries in each per-locale [ResourceTable](/engine/6000.7/script-reference/unity/localization/resourcetable.md) are left untouched, so clear the shared data and every locale table together to avoid orphaning translations.

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

Remove all keys from the shared data.

### Examples

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

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

            sharedData.Clear();

            Debug.Log(sharedData.Entries.Count);   // 0
        }
    }
}
```
