# PlayModeScopeAutoCleanup

> Obsolete. Use DelegateAutoCleanup.CreateForPlayMode instead. Previously used by the source generator to reset static variables when entering or exiting Play mode with domain reload disabled.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

> **Warning:**
>
> **Deprecated.** PlayModeScopeAutoCleanup is no longer emitted by the source generator. Use DelegateAutoCleanup.CreateForPlayMode(...) instead.

```csharp
public abstract class PlayModeScopeAutoCleanup : ClassAutoCleanup
```
