Roses/Assets/Scripts/View/DisplaySetup.cs
2024-04-12 20:18:06 +02:00

18 lines
No EOL
533 B
C#

#if !UNITY_EDITOR
using SatorImaging.AppWindowUtility;
using UnityEngine;
namespace View {
internal static class DisplaySetup {
[RuntimeInitializeOnLoadMethod]
private static void Setup() {
AppWindowUtility.AlwaysOnTop = true;
AppWindowUtility.FrameVisibility = false;
Vector2Int resolution = new(Screen.currentResolution.width, Screen.currentResolution.height);
Vector2Int newPosition = new(resolution.x - Screen.width, 0);
Screen.MoveMainWindowTo(Screen.mainWindowDisplayInfo, newPosition);
}
}
}
#endif