mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-07 10:03:38 +08:00
Cleanup
This commit is contained in:
parent
31dd54d25c
commit
e49ed3028f
@ -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;
|
||||||
|
@ -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}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user