using SatorImaging.AppWindowUtility; using UnityEngine; namespace View { internal static class DisplaySetup { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] private static void Setup() { #if !UNITY_EDITOR AppWindowUtility.AlwaysOnTop = true; AppWindowUtility.FrameVisibility = false; AppWindowUtility.Transparent = true; AppWindowUtility.SetWindowOpacity(0xFF); Vector2Int displaySize = new(Screen.currentResolution.width, Screen.currentResolution.height); const float aspect = 10f / 15f; int windowHeight = (int)(displaySize.y * .45f); int windowWidth = (int)(windowHeight * aspect); int margin = (int)(displaySize.x * .01f); AppWindowUtility.ResizeWindow(windowWidth, windowHeight); AppWindowUtility.MoveWindow(displaySize.x - windowWidth - margin, margin); #endif } } }