feat: setup window using the api
This commit is contained in:
parent
61c18429a2
commit
19cd8e5d03
27 changed files with 1364 additions and 10 deletions
|
@ -681,6 +681,7 @@ GameObject:
|
|||
- component: {fileID: 501733678}
|
||||
- component: {fileID: 501733677}
|
||||
- component: {fileID: 501733676}
|
||||
- component: {fileID: 501733679}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
|
@ -762,6 +763,21 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &501733679
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 501733675}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a1866eebb0b62a44da3196d0f2fb1b0c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mouseButton: 0
|
||||
modifierKey: 0
|
||||
temporarilyDisableIfKeyPressed:
|
||||
--- !u!1 &1050150008
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -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