# EnteredPlayMode

> Occurs during the next update of the Editor application if it is in play mode and was previously in edit mode.

## Definition

* **Type:** Field
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
EnteredPlayMode = 2
```

### Remarks

In this condition both [EditorApplication.isPlaying](/engine/6000.5/script-reference/unityeditor/editorapplication/isplaying.md) and [EditorApplication.isPlayingOrWillChangePlaymode](/engine/6000.5/script-reference/unityeditor/editorapplication/isplayingorwillchangeplaymode.md) are `true`.

Because this event is synchronized with the Editor application's update loop, it might occur after the game's update loop has already executed one or more times.

For new code, use [OnEnteringPlayModeAttribute](/engine/6000.5/script-reference/unityengine/onenteringplaymodeattribute.md) instead to avoid unnecessary event subscription handling. For more information, refer to [Code reload and the code lifecycle](/engine/6000.5/manual/scripting/compilation-and-code-reload/programming-code-lifecycle.md) in the manual.
