# KeyGenerator

> The generator that assigns stable ids to new keys.

## Definition

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

```csharp
public IKeyGenerator KeyGenerator { get; set; }
```

### Remarks

Defaults to a [DistributedUIDGenerator](/engine/6000.7/script-reference/unity/localization/distributeduidgenerator.md). Setting it to `null` restores that default rather than leaving the property unset. [SharedTableData.AddKey](/engine/6000.7/script-reference/unity/localization/sharedtabledata/addkey.md) calls [IKeyGenerator.GetNextKey](/engine/6000.7/script-reference/unity/localization/ikeygenerator/getnextkey.md) to obtain each new id.
