feat: basic window resizing
This commit is contained in:
parent
438b16fc6e
commit
ce692af862
18 changed files with 324 additions and 74 deletions
|
@ -679,6 +679,7 @@ GameObject:
|
|||
- component: {fileID: 501733677}
|
||||
- component: {fileID: 501733676}
|
||||
- component: {fileID: 501733679}
|
||||
- component: {fileID: 501733680}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
|
@ -773,8 +774,19 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mouseButton: 0
|
||||
modifierKey: 0
|
||||
temporarilyDisableIfKeyPressed:
|
||||
--- !u!114 &501733680
|
||||
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: 0d779b53ae5c4644b516e84fdc31fcdc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mouseButton: 0
|
||||
--- !u!1 &902566661
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if !UNITY_EDITOR
|
||||
|
||||
using SatorImaging.AppWindowUtility;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -6,13 +6,14 @@ namespace View {
|
|||
internal static class DisplaySetup {
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
|
||||
private static void Setup() {
|
||||
#if !UNITY_EDITOR
|
||||
AppWindowUtility.AlwaysOnTop = true;
|
||||
AppWindowUtility.FrameVisibility = false;
|
||||
|
||||
//Vector2Int resolution = new(360, 640);
|
||||
Vector2Int resolution = new(360, 540);
|
||||
AppWindowUtility.ResizeWindowRelative(resolution.x, resolution.y);
|
||||
AppWindowUtility.ResizeWindow(resolution.x, resolution.y);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue