That is to say - even if the right one is marked as primary in windows. When this happens, I also get two cursors - the one I’ve set in Unity and my windows cursor.
It can be fixed by switching fullscreen off and back on again and then on subsequent runs, everything is fine. If I delete playerprefs from the registry, it happens again.
I tried calling this on startup Display.displays[0].Activate();
But it causes fullscreen switching on the first run to not work at all (however, all is fine on subsequent runs).
My current workaround is this:
Screen.fullScreen = false;
Invoke("fullScreenOn", 0.02f);
void fullScreenOn()
{
Screen.fullScreen = true;
}
It does exactly what you’d think - the game opens on the wrong monitor, then flickers over to the right one. It looks ugly but is preferrable to just staying on the wrong one.
Am I doing something wrong to begin with? Is there a better workaround?