This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace UnityExplorer
1616 public static class ExplorerCore
1717 {
1818 public const string NAME = "UnityExplorer" ;
19- public const string VERSION = "4.4.1 " ;
19+ public const string VERSION = "4.4.2 " ;
2020 public const string AUTHOR = "Sinai" ;
2121 public const string GUID = "com.sinai.unityexplorer" ;
2222
Original file line number Diff line number Diff line change 1414using UnityExplorer . UI . Widgets ;
1515using UniverseLib . UI ;
1616using UniverseLib ;
17+ using System . Collections ;
1718
1819namespace UnityExplorer . ObjectExplorer
1920{
@@ -254,6 +255,21 @@ public override void ConstructUI(GameObject content)
254255 // Scene Loader
255256
256257 ConstructSceneLoader ( ) ;
258+
259+ RuntimeProvider . Instance . StartCoroutine ( TempFixCoro ( ) ) ;
260+ }
261+
262+ // To "fix" a strange FPS drop issue with MelonLoader.
263+ private IEnumerator TempFixCoro ( )
264+ {
265+ float start = Time . realtimeSinceStartup ;
266+
267+ while ( Time . realtimeSinceStartup - start < 2.5f )
268+ yield return null ;
269+
270+ // Select "HideAndDontSave" and then go back to first scene.
271+ this . sceneDropdown . value = sceneDropdown . options . Count - 1 ;
272+ this . sceneDropdown . value = 0 ;
257273 }
258274
259275 private const string DEFAULT_LOAD_TEXT = "[Select a scene]" ;
Original file line number Diff line number Diff line change @@ -133,10 +133,11 @@ internal static void Update()
133133 LoadedScenes . Add ( scene ) ;
134134 }
135135
136- bool anyChange = confirmedCount != LoadedScenes . Count ;
137-
138136 LoadedScenes . Add ( DontDestroyScene ) ;
139137 LoadedScenes . Add ( default ) ;
138+
139+ bool anyChange = confirmedCount != LoadedScenes . Count ;
140+
140141 previousLoadedScenes = new HashSet < Scene > ( LoadedScenes ) ;
141142
142143 // Default to first scene if none selected or previous selection no longer exists.
You can’t perform that action at this time.
0 commit comments