Legacy Documentation: Version 2017.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorApplication.isPaused

public static bool isPaused;

Description

Is editor currently paused?

Lets you change pause state programmatically, like pressing the Pause button in the main toolbar.

See Also: isPlaying.

// Simple editor Script that confirms the running
// game is paused.

using UnityEngine; using UnityEngine.SceneManagement;

public class isPausedExample { [MenuItem("Examples/Scene paused in play mode")] static void EditorPlaying() { if (EditorApplication.isPaused) { Debug.Log("Paused"); } } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答