I encountered this as well.
Builds made with 2021.3.4f1 opens on second monitor, while builds made on 2021.1.19f1 opens on main monitor.
If I change the 2021.3.4f1 build to open on main monitor (ALT+ENTER and move it to correct monitor), all builds made on 2021.1.19f1 will now open on second monitor instead, completely opposite of 2021.3.4f1.
I got an email saying this is now fixed, but in version 2023.1x.
No indication yet of backporting to 2021 LTS although I will try updating to 2021.3.6f1 LTS in the hopes it is fixed there too.
Note that 2023.1.x isnât available even as a preview alpha/beta release yet.
I am actively working on the backport. It is not fixed in 2021.3.6f1.
Just updated to Unity 2021.3.5 and Iâm encountering this problem too.
same problem here ![]()
The fix just landed to 2022.1.13f1. Itâs very close to landing to 2021.3 and 2022.2 release lines. Apologies for the delay. These changes are very delicate so we needed to be very thorough to minimize the risk of more regressions.
The fix landed to 2021.3.9f1. Hereâs what you can expect:
⢠Primary display is now always the first display we return from Screen.GetDisplayLayout() API.
⢠The first time you launch the game, it will launch on the display that Windows finds most suitable (generally, this means the display Windows Explorer or Steam was open on). This behaviour didnât change but I thought itâs worth calling it out.
⢠Next time the game starts, it will run on the same display that it ran on previously.
⢠If the game last ran on the primary display and you change the primary display to another display, then next time the game starts it will run on the new primary display.
⢠If youâre upgrading from Unity 2020.3 and the game ran on the primary display, it will continue running on the primary display;
⢠If youâre upgrading from a broken Unity 2021.x version, then the game might start on the wrong display. You can work around it by calling Screen.MoveMainWindowTo() to display index 0 (previously, this wouldnât be the case on all machines), or manually move the window using WIN + SHIFT + arrow keys. Unfortunately due to the way this data is saved, we are not able to distinguish whether it was saved using older 2020.3 version or a broken 2021.x version so we treat it as if it was saved by a non-broken version.
Thank you very much for fixing this and letting us know about it.
So I just upgraded to 2021.3.15f1 and now the following workaround Iâve been using in 2021.3.4f1 is broken:
void Awake()
{
#if !UNITY_EDITOR
// fixes new Unity2021 bug where the secondary monitor was being chosen when the game launches in a release build
StartCoroutine("MoveToPrimaryDisplay");
#endif
}
IEnumerable MoveToPrimaryDisplay()
{
List<DisplayInfo> displays = new List<DisplayInfo>();
Screen.GetDisplayLayout(displays);
if (displays?.Count > 1) // don't bother running if only one display exists...
{
var moveOperation = Screen.MoveMainWindowTo(displays[0], new Vector2Int(displays[0].width / 2, displays[0].height / 2));
yield return moveOperation;
}
}
I have 3 monitors on my windows 10 pro machine, the one in the center with âmake this my main displayâ checked has an Identity of 1. As of Upgrading to 2021.3.15f1 my builds are appearing on my left monitor which has an identity of 2 and has âmake this my main displayâ un-checked.
Per your statement âPrimary display is now always the first display we return from Screen.GetDisplayLayout() API.â, Iâm seeing that does not appear to be the case, given my code above, the value of displays[0] is neither the first monitor based on Identity nor is it the monitor configured with âmake this my main displayâ checked.
The good news is that after commenting out my workaround code and doing another build, manually moving the window using WIN + SHIFT + arrow keys did in fact work and then upon restarting the game it launched in the primary display as expected.
Hey @toddw_1 , that is very unexpected. Could you by any chance show your monitor setup in the Windows display settings and also run this C# program on your machine and show its output?
8701290â1174623âProgram.cs (11.8 KB)
Yup, here ya go. Please let me know if you need something further.



Thanks. Can you also tell the me order Unity reports your monitors in (by looking at displayInfo.name)?
Hi @toddw_1 , it seems that the issue is with the StartCoroutine which isnât executed anymore. Calling directly MoveToPrimaryDisplay as a void function works for me.
Interesting, just tested this and Iâm seeing the same thing, the MoveToPrimaryDisplay method wonât fire if called via StartCoroutine in the scope of Awake. Not sure if that is a new bug or a new fix in Unityâs functionality. Either way Iâm no longer calling the method anyway, but that is an interesting find, thanks fabrmooc.
Sure.

In light of @fabrmooc 's post Iâm guessing my issue was the fact that the IEnumerable method when called via StartCoroutine in the scope of Awake is no longer executing in Unity 2021.3.15f1, which would explain why my solution suddenly stopped working as my first monitor in the array looks accurate. I suppose I should have used the Watch or Immediate window to verify the contents of displays[0] was indeed a display other than my primary, but I must have just assumed it wasnât given the behavior of the build, sorry about that, I should have been more thorough.
Iâm glad itâs resolved but Iâm now worried about StartCoroutine misbehavingâŚ
Hi!
Some players of my game reported the same thing, that the game starts on their second monitor and it keeps starting there every time they open up the game.
I canât reproduce the problem because I only have 1 monitor.
I use Unity 2019.4.40f1 LTS
Any progress on this?
No, this is the first time weâve ever seen this reported in Unity 2019.4. Unity 2019.4 didnât have any logic to remember which monitor it started on so I find the report weird. They can always use WIN + SHIFT + LEFT/RIGHT ARROW to move the game between different monitors, though.
So, I should just tell them to use WIN + SHIFT + LEFT/RIGHT ARROW to move the game between different monitors?
Or is there a script or something that I can use to make it more consumer friendly?
Thank you for the reply!
