What happens if the game fails to launch in ExclusiveFullScreen?

Unity 2022.3.26f1
Windows Build

Symptom.

While launching ExclusiveFullScreen, click on another window or press Enter
FullScreenWindow is launched instead of ExclusiveFullScreen.

The launched FullScreenWindow appears in the foreground, but does not react keyboard input.

When the above symptoms occur, the following information is output from Player.log.

<RI> Input initialized.

dxgi: swapchain SetFullscreenState failed (887a0022).
<RI> Initialized touch support.

UnloadTime: 0.621100 ms
Failed to change display to ExclusiveFullscreen...reverting to FullscreenWindow

Even though the FullscreenWindow is displayed in the foreground, keyboard input is not reflected because the game window is not in focus.

A user operating with the keyboard cannot recognize that the game window does not have focus and appears inoperable.
(If the game window has focus by clicking with the mouse, it can be operated with the keyboard.)

The same procedure may fail to start in ExclusiveFullscreen and start in Windowed.
In this case, the game window is not displayed in the foreground and the user can recognize that the game window does not have focus.

If another window is clicked or the Enter key is pressed while the FullScreenWindow is launched , the FullScreenWindow will be launched.
But not appear in the foreground, and the user will can recognize that the game window does not have focus.

Questions.

  1. if a game cannot be launched in ExclusiveFullscreen, is it Unity’s specification to launch the game in either FullscreenWindow or Windowed?

  2. In case 1. What conditions are used to determine whether to launch the game in FullscreenWindow or Windowed?

  3. if a game cannot be launched in ExclusiveFullscreen and is changed to launch in FullscreenWindow, is there a way to prevent the game from appearing in the foreground or to ensure that the game is focused?

All of Unity’s windowing and fullscreen behavior is unfortunately not well documented and you’re mostly left to test and try to work around Unity’s implementation.

Not getting focus or inconsistently falling back to windowed or fullscreen window do sound like issues you could try reporting a bug for.

Generally, do you really need exclusive full screen? My understanding is that exclusive fullscreen is outdated and leads to a bad user experience. At the very least, I would only offer it as an opt-in option in the game’s settings.

Unity itself remarks in the documentation for FullScreenMode.ExclusiveFullScreen that it’s only supported on Windows and not with Vulkan, and that it “might negatively affect performance of your application”.

Thank you for your response.

Our project is built exclusively for Windows.
General Windows games can be run with ExclusiveFullscreen and we offer it as an option in our project.

If the game was in Exclusive Fullscreen the last time, it will run in Exclusive Fullscreen the next time. (I understand that this behavior is done by Unity before control is transferred to the game.)
This behavior is the cause of this issue.

I will continue to investigate.