Version: 2023.2
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