From 65c0532d92c8e4ec163c11b866c65383bca99327 Mon Sep 17 00:00:00 2001 From: Kyle1413 Date: Fri, 15 Mar 2019 10:43:04 -0400 Subject: [PATCH 01/97] Update For Beat Saber 0.13.0 --- CustomSaber/CustomSaber.csproj | 7 ++-- CustomSaber/Plugin.cs | 2 +- CustomSaber/SaberScript.cs | 14 +++----- CustomSaber/UI/SaberListViewController.cs | 39 +++++++++++++++++------ 4 files changed, 41 insertions(+), 21 deletions(-) diff --git a/CustomSaber/CustomSaber.csproj b/CustomSaber/CustomSaber.csproj index f79b0ba..1ef4fba 100644 --- a/CustomSaber/CustomSaber.csproj +++ b/CustomSaber/CustomSaber.csproj @@ -47,6 +47,9 @@ C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Plugins\BeatSaberCustomUI.dll + + C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Plugins\BS_Utils.dll + C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Plugins\CustomColors.dll @@ -75,8 +78,8 @@ - - C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\TextMeshPro-1.0.55.2017.1.0b12.dll + + C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Unity.TextMeshPro.dll C:\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.dll diff --git a/CustomSaber/Plugin.cs b/CustomSaber/Plugin.cs index ad6d1e4..50cda76 100644 --- a/CustomSaber/Plugin.cs +++ b/CustomSaber/Plugin.cs @@ -79,7 +79,7 @@ private void SceneManagerOnActiveSceneChanged(Scene arg0, Scene scene) SaberScript.LoadAssets(); } - if (scene.name == "Menu") + if (scene.name == "MenuCore") { if (_currentSaber != null) { diff --git a/CustomSaber/SaberScript.cs b/CustomSaber/SaberScript.cs index 0f39706..a1794c5 100644 --- a/CustomSaber/SaberScript.cs +++ b/CustomSaber/SaberScript.cs @@ -90,14 +90,10 @@ private void Start() Restart(); } - StandardLevelSceneSetup GetGameSceneSetup() + BS_Utils.Gameplay.LevelData GetGameSceneSetup() { - StandardLevelSceneSetup s = GameObject.FindObjectOfType(); - if (s == null) - { - s = UnityEngine.Resources.FindObjectsOfTypeAll().FirstOrDefault(); - } - return s; + + return BS_Utils.Plugin.LevelData; } private void AddEvents() @@ -182,8 +178,8 @@ private void AddEvents() try { - StandardLevelSceneSetup mgs = GetGameSceneSetup(); - BeatmapData beatmapData = mgs.standardLevelSceneSetupData.difficultyBeatmap.beatmapData; + BS_Utils.Gameplay.LevelData mgs = GetGameSceneSetup(); + BeatmapData beatmapData = mgs.GameplayCoreSceneSetupData.difficultyBeatmap.beatmapData; BeatmapLineData[] beatmapLinesData = beatmapData.beatmapLinesData; float LastTime = 0.0f; diff --git a/CustomSaber/UI/SaberListViewController.cs b/CustomSaber/UI/SaberListViewController.cs index 468f68c..c66cf4d 100644 --- a/CustomSaber/UI/SaberListViewController.cs +++ b/CustomSaber/UI/SaberListViewController.cs @@ -81,7 +81,7 @@ protected override void DidActivate(bool firstActivation, ActivationType type) _sabersTableView.SetPrivateField("_isInitialized", false); _sabersTableView.dataSource = this; - _sabersTableView.didSelectRowEvent += _sabersTableView_DidSelectRowEvent; + _sabersTableView.didSelectCellWithIdxEvent += _sabersTableView_DidSelectRowEvent; _pageUpButton = Instantiate(Resources.FindObjectsOfTypeAll