# Persistence

### **Lifetime configuration**

The CoherenceSync editor interface allows us to define the Lifetime of a networked object. The following options are available:

* **Session Based.** No persistence. The Entity will disappear when the Client or Simulator disconnects.
* **Persistent.** The Entity will remain on the Server until a simulating Client deletes it.

{% hint style="info" %}
For managing unique persistent objects, see [Uniqueness](https://docs.coherence.io/1.2/coherence-sdk-for-unity/lifetime/uniqueness).
{% endhint %}

### **Deleting a persistent object**

A persistent object can be deleted only by the Client or Simulator that has authority over it. For indirect remote deletion, see the section about [network commands](https://docs.coherence.io/1.2/coherence-sdk-for-unity/networking-state-changes/commands).

Deleting a persistent object is done the same as with any network object - by destroying its GameObject.

```csharp
Destroy(coherenceSync.gameObject);
```

### Persistent objects are stored

All persistent objects remain in the World for the entire lifetime of the Replication Server and, periodically, the Replication Server records the state of the World and saves it to physical storage. If the Replication Server is restarted, then the saved persistent objects are reloaded when the Replication Server resumes.

### Persistent object limits

{% hint style="warning" %}
Currently, the maximum number of persistent objects supported by the Replication Server is **32 000**. This limit will be increased in the near future.
{% endhint %}
