# Uniqueness

Uniqueness is about naming entities and guaranteeing that a named entity can only exist once. This name is referred to as **Unique ID**.

To start using uniqueness, set CoherenceSync's Uniqueness setting to `No Duplicates`:

<figure><img src="/files/svvURZTmYJTcThm6MDjQ" alt=""><figcaption><p>CoherenceSync Inspector</p></figcaption></figure>

### Unique ID

The ID or name of the entity. Use any name you might help you recognize it over the network, for example: `game manager`, `boss, spawner`, `chest 1`, ...

When Manual Unique ID is left empty, Prefab Instance Unique ID will be used instead. The latter is assigned automatically (for prefab instances), to tell apart different instances on the scene easily. This is handy when your scene has a handful of the entities \[that come from the same Prefab] around.

{% hint style="info" %}
In **coherence**, the concepts of **Authority**, **Persistence** and **Uniqueness** often go hand-in-hand. For example, uniqueness can be useful to keep track of persistent objects. Despite this, all three can also function on their own.
{% endhint %}

### Advanced Uniqueness Options

#### Replacement Strategy

Replacement occurs when there's an attempt to create a named entity that already exists. For example, you have `player` in your scene, and you instantiate another `player`.

By default, a Replace strategy is applied. This strategy makes sure the actual GameObject is kept, but the underlying linked entity is updated. This way, Unity Object references are not lost.

However, there's scenarios where you might want to trigger an actual Destroy operation when this happens - for such cases, the Destroy strategy can be used.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/manual/lifetime/uniqueness.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
