Application.isFocused
public static bool isFocused;
Description 描述
Whether the player currently has focus. Read-only.
In the editor, this corresponds to whether the game view has focus (regardless of whether the editor is in play mode or not).
See Also: MonoBehaviour.OnApplicationFocus.