From 57bb6c73c4b20c5eab167e5f1908d8666c505cb9 Mon Sep 17 00:00:00 2001 From: Firerise9402 <90978630+Firerise9402@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:03:24 -0400 Subject: [PATCH 1/2] fixed the bugs --- Assets/Scripts/WindowController.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/WindowController.cs b/Assets/Scripts/WindowController.cs index 7e941d679..56753abd0 100644 --- a/Assets/Scripts/WindowController.cs +++ b/Assets/Scripts/WindowController.cs @@ -48,8 +48,12 @@ namespace HeavenStudio #if UNITY_EDITOR return; #else - UniController.windowSize = (new Vector2(resX, resY)); - UniController.windowPosition = (new Vector2(x, y)); + if(Application.isEditor || !Editor.Editor.instance.fullscreen || !Conductor.instance.isPlaying) return; + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + UniController.windowSize = (new Vector2(resX, resY)); + UniController.windowPosition = (new Vector2(x, y)); + } #endif } @@ -101,10 +105,7 @@ namespace HeavenStudio UpdateScale(); UpdatePan(); //SetShakeIntensity(); - if(PersistentDataManager.gameSettings.windowDanceEnable) - { - SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); - } + SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); } private void UpdatePan() @@ -213,11 +214,7 @@ namespace HeavenStudio pan = defaultPan; scale = defaultScale; shakeResult = defaultShake; - if(Application.isEditor) return; - if(PersistentDataManager.gameSettings.windowDanceEnable) - { - SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); - } + SetPosition(Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); } } } \ No newline at end of file From 39f7cbfd6eeded94de8b37065c4f30859e39bdf5 Mon Sep 17 00:00:00 2001 From: Firerise9402 <90978630+Firerise9402@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:40:30 -0400 Subject: [PATCH 2/2] cleaning up some junk code --- Assets/Scenes/Editor.unity | 116 ++++++++++---------------- Assets/Scripts/AppInfo.cs | 4 +- Assets/Scripts/WindowController.cs | 8 +- ProjectSettings/ProjectSettings.asset | 6 +- 4 files changed, 52 insertions(+), 82 deletions(-) diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index 34bbcadfd..6ad4a3110 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -2465,7 +2465,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 285182280367868644, guid: 81ce52789acca4440804eb938de70425, type: 3} propertyPath: m_RootOrder - value: 10 + value: 9 objectReference: {fileID: 0} - target: {fileID: 285182280367868644, guid: 81ce52789acca4440804eb938de70425, type: 3} propertyPath: m_LocalPosition.x @@ -13777,7 +13777,7 @@ PrefabInstance: - target: {fileID: 176381795900272283, guid: 720073bc7682b1441bece7116681f72c, type: 3} propertyPath: UniController value: - objectReference: {fileID: 693146899} + objectReference: {fileID: 0} - target: {fileID: 3558106557710386107, guid: 720073bc7682b1441bece7116681f72c, type: 3} propertyPath: m_BlockingMask.m_Bits value: 0 @@ -13800,7 +13800,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6052331674888157612, guid: 720073bc7682b1441bece7116681f72c, type: 3} propertyPath: m_RootOrder - value: 9 + value: 8 objectReference: {fileID: 0} - target: {fileID: 6052331674888157612, guid: 720073bc7682b1441bece7116681f72c, type: 3} propertyPath: m_LocalPosition.x @@ -13872,6 +13872,42 @@ GameObject: m_CorrespondingSourceObject: {fileID: 6052331674369862802, guid: 720073bc7682b1441bece7116681f72c, type: 3} m_PrefabInstance: {fileID: 631525709} m_PrefabAsset: {fileID: 0} +--- !u!1 &631525714 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3223354119073494540, guid: 720073bc7682b1441bece7116681f72c, type: 3} + m_PrefabInstance: {fileID: 631525709} + m_PrefabAsset: {fileID: 0} +--- !u!114 &631525715 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 631525714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb951500192d2430eb3e306480cc2f31, type: 3} + m_Name: + m_EditorClassIdentifier: + _isTransparent: 0 + _alphaValue: 1 + _isTopmost: 0 + _isBottommost: 0 + _isZoomed: 0 + _shouldFitMonitor: 0 + _allowDropFiles: 0 + isHitTestEnabled: 1 + hitTestType: 1 + opacityThreshold: 0.1 + autoSwitchCameraBackground: 1 + forceWindowed: 0 + currentCamera: {fileID: 0} + transparentType: 1 + keyColor: + serializedVersion: 2 + rgba: 65537 + onObject: 1 + pickedColor: {r: 0, g: 0, b: 0, a: 0} --- !u!1 &632795495 GameObject: m_ObjectHideFlags: 0 @@ -15987,74 +16023,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 692958306} m_CullTransparentMesh: 1 ---- !u!1001 &693146897 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_RootOrder - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2416199871598626844, guid: e893aefd93740714b999573b02916984, type: 3} - propertyPath: m_Name - value: UniWindowController - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: e893aefd93740714b999573b02916984, type: 3} ---- !u!114 &693146899 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2416199871598626845, guid: e893aefd93740714b999573b02916984, type: 3} - m_PrefabInstance: {fileID: 693146897} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: eb951500192d2430eb3e306480cc2f31, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &703340358 GameObject: m_ObjectHideFlags: 0 @@ -20141,8 +20109,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1589389272} m_HandleRect: {fileID: 1589389271} m_Direction: 2 - m_Value: 1 - m_Size: 0.99106413 + m_Value: 0 + m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -23667,7 +23635,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -408.97943, y: -17} + m_AnchoredPosition: {x: -408.9795, y: -17} m_SizeDelta: {x: -817.96, y: -46.29} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1121370303 diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index bb7aef405..c017e6c29 100644 --- a/Assets/Scripts/AppInfo.cs +++ b/Assets/Scripts/AppInfo.cs @@ -1,8 +1,8 @@ using System; public static class AppInfo { - public const string Version = "0.0.1051"; - public static readonly DateTime Date = new DateTime(2023, 10, 09, 19, 05, 36, 828, DateTimeKind.Utc); + public const string Version = "0.0.1066"; + public static readonly DateTime Date = new DateTime(2023, 10, 10, 15, 37, 25, 456, DateTimeKind.Utc); } diff --git a/Assets/Scripts/WindowController.cs b/Assets/Scripts/WindowController.cs index 56753abd0..6e70f61ac 100644 --- a/Assets/Scripts/WindowController.cs +++ b/Assets/Scripts/WindowController.cs @@ -15,9 +15,10 @@ namespace HeavenStudio { public class WindowController : MonoBehaviour { - [SerializeField] UniWindowController UniController; public static WindowController instance { get; private set; } + private UniWindowController controls; + public enum ViewAxis { All, @@ -51,8 +52,8 @@ namespace HeavenStudio if(Application.isEditor || !Editor.Editor.instance.fullscreen || !Conductor.instance.isPlaying) return; if(PersistentDataManager.gameSettings.windowDanceEnable) { - UniController.windowSize = (new Vector2(resX, resY)); - UniController.windowPosition = (new Vector2(x, y)); + controls.windowSize = (new Vector2(resX, resY)); + controls.windowPosition = (new Vector2(x, y)); } #endif } @@ -69,6 +70,7 @@ namespace HeavenStudio // Start is called before the first frame update void Start() { + controls = GetComponent(); GameManager.instance.onBeatChanged += OnBeatChanged; Reset(); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 666c42da2..bbb9579be 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.0.1051 + bundleVersion: 0.0.1066 preloadedAssets: - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} metroInputSource: 0 @@ -158,11 +158,11 @@ PlayerSettings: applicationIdentifier: Standalone: com.RHeavenStudio.Heaven-Studio buildNumber: - Standalone: 1051 + Standalone: 1066 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 1051 + AndroidBundleVersionCode: 1066 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1