Version: 2023.1
public static bool isFocused ;

描述

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).

另请参阅:MonoBehaviour.OnApplicationFocus