From e49ed3028f022bdff3e25cc94886ace5b53912b3 Mon Sep 17 00:00:00 2001 From: Sinai <49360850+sinai-dev@users.noreply.github.com> Date: Fri, 6 Aug 2021 18:44:13 +1000 Subject: [PATCH] Cleanup --- src/Core/Reflection/Il2CppReflection.cs | 2 +- src/ObjectExplorer/SceneHandler.cs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Core/Reflection/Il2CppReflection.cs b/src/Core/Reflection/Il2CppReflection.cs index 7818840..06dc57b 100644 --- a/src/Core/Reflection/Il2CppReflection.cs +++ b/src/Core/Reflection/Il2CppReflection.cs @@ -517,7 +517,7 @@ namespace UnityExplorer //Assembly.Load(File.ReadAllBytes(fullPath)); return true; } - catch (Exception e) + catch //(Exception e) { //ExplorerCore.LogWarning($"Failed loading module '{Path.GetFileName(fullPath)}'! {e.ReflectionExToString()}"); return false; diff --git a/src/ObjectExplorer/SceneHandler.cs b/src/ObjectExplorer/SceneHandler.cs index bb37217..2add292 100644 --- a/src/ObjectExplorer/SceneHandler.cs +++ b/src/ObjectExplorer/SceneHandler.cs @@ -40,14 +40,12 @@ namespace UnityExplorer.ObjectExplorer /// /// The names of all scenes in the build settings, if they could be retrieved. /// - public static ReadOnlyCollection AllSceneNames => new ReadOnlyCollection(allScenesInBuild); - private static readonly List allScenesInBuild = new List(); + public static readonly List AllSceneNames = new List(); /// /// Whether or not we successfuly retrieved the names of the scenes in the build settings. /// - public static bool WasAbleToGetScenesInBuild => gotAllScenesInBuild; - private static bool gotAllScenesInBuild = true; + public static bool WasAbleToGetScenesInBuild { get; private set; } /// /// Invoked when the currently inspected Scene changes. The argument is the new scene. @@ -97,12 +95,12 @@ namespace UnityExplorer.ObjectExplorer for (int i = 0; i < sceneCount; i++) { var scenePath = (string)method.Invoke(null, new object[] { i }); - allScenesInBuild.Add(scenePath); + AllSceneNames.Add(scenePath); } } catch (Exception ex) { - gotAllScenesInBuild = false; + WasAbleToGetScenesInBuild = false; ExplorerCore.LogWarning($"Unable to generate list of all Scenes in the build: {ex}"); } }