编辑器当前是否已暂停?
允许您以编程方式更改暂停状态,例如按下主工具栏中的 Pause 按钮。
另请参阅: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"); } } }