feat: setup window using the api
This commit is contained in:
parent
61c18429a2
commit
19cd8e5d03
27 changed files with 1364 additions and 10 deletions
|
@ -1,18 +1,17 @@
|
|||
#if !UNITY_EDITOR
|
||||
//#if !UNITY_EDITOR
|
||||
using SatorImaging.AppWindowUtility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace View {
|
||||
internal static class DisplaySetup {
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
|
||||
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);
|
||||
Vector2Int resolution = new(360, 640);
|
||||
AppWindowUtility.ResizeWindowRelative(resolution.x, resolution.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
Loading…
Add table
Add a link
Reference in a new issue