From 28ef28e0d88cc635d51f678c9e1a87b16f7eddf8 Mon Sep 17 00:00:00 2001 From: Braedon Lewis Date: Wed, 27 Sep 2023 13:14:33 -0400 Subject: [PATCH] sus fix for loading and saving --- Assets/Scripts/GameManager.cs | 1 + Assets/Scripts/LevelEditor/Editor.cs | 2 ++ Assets/Scripts/LevelEditor/Timeline/Timeline.cs | 2 -- Assets/Scripts/LevelEditor/Timeline/TimelineBlockManager.cs | 2 ++ Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs | 2 -- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 7aaf28adb..8196250c1 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -222,6 +222,7 @@ namespace HeavenStudio Beatmap.AddNewVolumeChange(0, 100f); Beatmap.data.offset = 0f; Conductor.instance.musicSource.clip = null; + RiqFileHandler.UnlockCache(); RiqFileHandler.WriteRiq(Beatmap); AudioLoadDone = true; } diff --git a/Assets/Scripts/LevelEditor/Editor.cs b/Assets/Scripts/LevelEditor/Editor.cs index f199279ec..0a0d354c5 100644 --- a/Assets/Scripts/LevelEditor/Editor.cs +++ b/Assets/Scripts/LevelEditor/Editor.cs @@ -380,6 +380,7 @@ namespace HeavenStudio.Editor { try { + RiqFileHandler.UnlockCache(); RiqFileHandler.WriteRiq(GameManager.instance.Beatmap); RiqFileHandler.PackRiq(path, true); Debug.Log("Packed RIQ successfully!"); @@ -430,6 +431,7 @@ namespace HeavenStudio.Editor try { + RiqFileHandler.UnlockCache(); string tmpDir = RiqFileHandler.ExtractRiq(path); Debug.Log("Imported RIQ successfully!"); LoadRemix(); diff --git a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs index 88a0df456..820c47498 100644 --- a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs @@ -348,8 +348,6 @@ namespace HeavenStudio.Editor.Track if (songBeats == 0) songBeats = 320; else songBeats += 10; - Debug.Log("test"); - TimelineContent.sizeDelta = new Vector2(songBeats * PixelsPerBeat, currentSizeDelta.y); // TimelineEventGrid.sizeDelta = new Vector2(songBeats * PixelsPerBeat, currentSizeDelta.y); RealTimelineContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x / Zoom, RealTimelineContent.sizeDelta.y); diff --git a/Assets/Scripts/LevelEditor/Timeline/TimelineBlockManager.cs b/Assets/Scripts/LevelEditor/Timeline/TimelineBlockManager.cs index aca52f87b..e9f443ccd 100644 --- a/Assets/Scripts/LevelEditor/Timeline/TimelineBlockManager.cs +++ b/Assets/Scripts/LevelEditor/Timeline/TimelineBlockManager.cs @@ -64,6 +64,8 @@ namespace HeavenStudio.Editor.Track entityToSet = entity; Pool.Get(); + + Debug.Log(entity.datamodel); } } diff --git a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs index 83b42e05f..bea994c73 100644 --- a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs +++ b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs @@ -4,10 +4,8 @@ using UnityEngine.UI; using Starpelly; using Jukebox; using TMPro; -using UnityEngine.Timeline; using System.Linq; using System.Collections.Generic; -using HeavenStudio.Editor.Commands; namespace HeavenStudio.Editor.Track {