Loading Assets/Scenes/SampleScene.unity +14 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading Assets/Scripts/View/DisplaySetup.cs +5 −4 Original line number Diff line number Diff line #if !UNITY_EDITOR using SatorImaging.AppWindowUtility; using UnityEngine; Loading @@ -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 } } } No newline at end of file #endif No newline at end of file Packages/AppWindowUtility/Runtime/AppWindowUtility.cs +5 −6 Original line number Diff line number Diff line Loading @@ -67,8 +67,11 @@ namespace SatorImaging.AppWindowUtility public static bool WindowResizeSupported { get => platform?.WindowResizeSupported ?? false; } public static void ResizeWindowRelative(int pixelX, int pixelY) => platform?.ResizeWindowRelative(pixelX, pixelY); public static void ResizeWindow(int pixelX, int pixelY) => platform?.ResizeWindow(pixelX, pixelY); public static void ResizeWindowRelative(float pixelX, float pixelY, Vector2 resizeDirection, float aspectRatio) => platform?.ResizeWindowRelative(pixelX, pixelY, resizeDirection, aspectRatio); Loading Loading @@ -106,9 +109,5 @@ namespace SatorImaging.AppWindowUtility }//set }// }//class }//namespace Packages/AppWindowUtility/Runtime/IPlatformDependent.cs +5 −3 Original line number Diff line number Diff line namespace SatorImaging.AppWindowUtility using UnityEngine; namespace SatorImaging.AppWindowUtility { public interface IPlatformDependent { Loading Loading @@ -36,8 +38,8 @@ void MoveWindow(int x, int y); bool WindowResizeSupported { get; } public void ResizeWindowRelative(int relativeWidth, int relativeHeight); public void ResizeWindow(int width, int height); void ResizeWindowRelative(float deltaX, float deltaY, Vector2 resizeDirection, float aspectRatio); }// }//namespace Packages/AppWindowUtility/Runtime/MouseButton.cs 0 → 100644 +7 −0 Original line number Diff line number Diff line namespace SatorImaging.AppWindowUtility { public enum MouseButton { Left = 0, Right = 1, Middle = 2, } } No newline at end of file Loading
Assets/Scenes/SampleScene.unity +14 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading
Assets/Scripts/View/DisplaySetup.cs +5 −4 Original line number Diff line number Diff line #if !UNITY_EDITOR using SatorImaging.AppWindowUtility; using UnityEngine; Loading @@ -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 } } } No newline at end of file #endif No newline at end of file
Packages/AppWindowUtility/Runtime/AppWindowUtility.cs +5 −6 Original line number Diff line number Diff line Loading @@ -67,8 +67,11 @@ namespace SatorImaging.AppWindowUtility public static bool WindowResizeSupported { get => platform?.WindowResizeSupported ?? false; } public static void ResizeWindowRelative(int pixelX, int pixelY) => platform?.ResizeWindowRelative(pixelX, pixelY); public static void ResizeWindow(int pixelX, int pixelY) => platform?.ResizeWindow(pixelX, pixelY); public static void ResizeWindowRelative(float pixelX, float pixelY, Vector2 resizeDirection, float aspectRatio) => platform?.ResizeWindowRelative(pixelX, pixelY, resizeDirection, aspectRatio); Loading Loading @@ -106,9 +109,5 @@ namespace SatorImaging.AppWindowUtility }//set }// }//class }//namespace
Packages/AppWindowUtility/Runtime/IPlatformDependent.cs +5 −3 Original line number Diff line number Diff line namespace SatorImaging.AppWindowUtility using UnityEngine; namespace SatorImaging.AppWindowUtility { public interface IPlatformDependent { Loading Loading @@ -36,8 +38,8 @@ void MoveWindow(int x, int y); bool WindowResizeSupported { get; } public void ResizeWindowRelative(int relativeWidth, int relativeHeight); public void ResizeWindow(int width, int height); void ResizeWindowRelative(float deltaX, float deltaY, Vector2 resizeDirection, float aspectRatio); }// }//namespace
Packages/AppWindowUtility/Runtime/MouseButton.cs 0 → 100644 +7 −0 Original line number Diff line number Diff line namespace SatorImaging.AppWindowUtility { public enum MouseButton { Left = 0, Right = 1, Middle = 2, } } No newline at end of file