This commit is contained in:
Sinai 2021-08-06 18:44:13 +10:00
parent 31dd54d25c
commit e49ed3028f
2 changed files with 5 additions and 7 deletions

View File

@ -517,7 +517,7 @@ namespace UnityExplorer
//Assembly.Load(File.ReadAllBytes(fullPath)); //Assembly.Load(File.ReadAllBytes(fullPath));
return true; return true;
} }
catch (Exception e) catch //(Exception e)
{ {
//ExplorerCore.LogWarning($"Failed loading module '{Path.GetFileName(fullPath)}'! {e.ReflectionExToString()}"); //ExplorerCore.LogWarning($"Failed loading module '{Path.GetFileName(fullPath)}'! {e.ReflectionExToString()}");
return false; return false;

View File

@ -40,14 +40,12 @@ namespace UnityExplorer.ObjectExplorer
/// <summary> /// <summary>
/// The names of all scenes in the build settings, if they could be retrieved. /// The names of all scenes in the build settings, if they could be retrieved.
/// </summary> /// </summary>
public static ReadOnlyCollection<string> AllSceneNames => new ReadOnlyCollection<string>(allScenesInBuild); public static readonly List<string> AllSceneNames = new List<string>();
private static readonly List<string> allScenesInBuild = new List<string>();
/// <summary> /// <summary>
/// Whether or not we successfuly retrieved the names of the scenes in the build settings. /// Whether or not we successfuly retrieved the names of the scenes in the build settings.
/// </summary> /// </summary>
public static bool WasAbleToGetScenesInBuild => gotAllScenesInBuild; public static bool WasAbleToGetScenesInBuild { get; private set; }
private static bool gotAllScenesInBuild = true;
/// <summary> /// <summary>
/// Invoked when the currently inspected Scene changes. The argument is the new scene. /// 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++) for (int i = 0; i < sceneCount; i++)
{ {
var scenePath = (string)method.Invoke(null, new object[] { i }); var scenePath = (string)method.Invoke(null, new object[] { i });
allScenesInBuild.Add(scenePath); AllSceneNames.Add(scenePath);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
gotAllScenesInBuild = false; WasAbleToGetScenesInBuild = false;
ExplorerCore.LogWarning($"Unable to generate list of all Scenes in the build: {ex}"); ExplorerCore.LogWarning($"Unable to generate list of all Scenes in the build: {ex}");
} }
} }