From cf6a3f87084a8c7f16fe525bd8fb34f1b15aeb01 Mon Sep 17 00:00:00 2001 From: Braedon Lewis Date: Wed, 27 Sep 2023 14:53:28 -0400 Subject: [PATCH] another fix --- Assets/Scripts/AppInfo.cs | 4 ++-- Assets/Scripts/LevelEditor/Editor.cs | 8 ++++++++ .../LevelEditor/EventSelector/GridGameSelector.cs | 2 -- Assets/Scripts/LevelEditor/Timeline/Timeline.cs | 12 +----------- .../Scripts/LevelEditor/Timeline/TimelineEventObj.cs | 3 +++ ProjectSettings/ProjectSettings.asset | 6 +++--- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index 543ab517a..293aa261b 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.997"; - public static readonly DateTime Date = new DateTime(2023, 09, 27, 17, 27, 16, 869, DateTimeKind.Utc); + public const string Version = "0.0.999"; + public static readonly DateTime Date = new DateTime(2023, 09, 27, 18, 03, 05, 747, DateTimeKind.Utc); } diff --git a/Assets/Scripts/LevelEditor/Editor.cs b/Assets/Scripts/LevelEditor/Editor.cs index 0a0d354c5..c98bb8929 100644 --- a/Assets/Scripts/LevelEditor/Editor.cs +++ b/Assets/Scripts/LevelEditor/Editor.cs @@ -81,6 +81,8 @@ namespace HeavenStudio.Editor public bool isShortcutsEnabled { get { return (!inAuthorativeMenu) && (!editingInputField); } } + private Vector2 lastScreenSize = Vector2.zero; + public static Editor instance { get; private set; } private void Start() @@ -144,6 +146,12 @@ namespace HeavenStudio.Editor public void LateUpdate() { + if (lastScreenSize != new Vector2(UnityEngine.Screen.width, UnityEngine.Screen.height)) + { + // Timeline.OnScreenResize(); + } + lastScreenSize = new Vector2(UnityEngine.Screen.width, UnityEngine.Screen.height); + #region Keyboard Shortcuts if (isShortcutsEnabled) { diff --git a/Assets/Scripts/LevelEditor/EventSelector/GridGameSelector.cs b/Assets/Scripts/LevelEditor/EventSelector/GridGameSelector.cs index 57d4e2a5e..1d2f67bab 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/GridGameSelector.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/GridGameSelector.cs @@ -142,8 +142,6 @@ namespace HeavenStudio.Editor SelectedMinigame = EventCaller.instance.GetMinigame(gameName); if (SelectedMinigame == null) { SelectGame("gameManager"); - currentEventIndex = 0; - UpdateIndex(0, false); Debug.LogWarning($"SelectGame() has failed, did you mean to input '{gameName}'?"); return; } diff --git a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs index 97cc4e369..5f77dfe40 100644 --- a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs @@ -185,7 +185,7 @@ namespace HeavenStudio.Editor.Track public float leftSide => (RealTimelineContent.anchoredPosition.x / PixelsPerBeat) * -1; public float rightSide => (TimelineScroll.viewport.rect.width / PixelsPerBeat) + leftSide; - private Vector2 lastViewportSize; + private Vector2 lastScreenSize; public static Timeline instance { get; private set; } @@ -607,14 +607,6 @@ namespace HeavenStudio.Editor.Track public void LateUpdate() { - if (TimelineScroll.viewport.rect.size != lastViewportSize) - { - foreach (var block in TimelineBlockManager.Instance.EntityMarkers) - { - block.Value.SetWidthHeight(); - } - } - TimelineBlockManager.Instance.UpdateMarkers(); BoxSelection.instance.LayerSelectUpdate(); @@ -627,8 +619,6 @@ namespace HeavenStudio.Editor.Track OverlayPanelContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, OverlayPanelContent.sizeDelta.y); LayersRect.anchoredPosition = new Vector2(LayersRect.anchoredPosition.x, TimelineContent.anchoredPosition.y); - - lastViewportSize = TimelineScroll.viewport.rect.size; } public static float GetScaleModifier() diff --git a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs index bea994c73..1baa97b71 100644 --- a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs +++ b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs @@ -259,6 +259,8 @@ namespace HeavenStudio.Editor.Track public void LateUpdate() { + rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, Timeline.instance.LayerHeight()); + var followXL = (Timeline.instance.leftSide - (float)entity.beat) * Timeline.instance.PixelsPerBeat; visibleRegion.offsetMin = new Vector2( Mathf.Clamp(followXL - 2, 0, (entity.length * Timeline.instance.PixelsPerBeat) - Timeline.instance.LayerHeight()), @@ -268,6 +270,7 @@ namespace HeavenStudio.Editor.Track visibleRegion.offsetMax = new Vector2( Mathf.Clamp(followXR, -(entity.length * Timeline.instance.PixelsPerBeat) + 8, 0), visibleRegion.offsetMax.y); + } public void BeginMoving(bool setMovedEntity = true) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index e1ea963b1..799e10343 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.997 + bundleVersion: 0.0.999 preloadedAssets: - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} metroInputSource: 0 @@ -158,11 +158,11 @@ PlayerSettings: applicationIdentifier: Standalone: com.RHeavenStudio.Heaven-Studio buildNumber: - Standalone: 997 + Standalone: 999 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 997 + AndroidBundleVersionCode: 999 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1