mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +08:00
Fallback to null check loading if unityVersion throws an exception
This commit is contained in:
parent
29c78dc5a6
commit
dfd55260a8
@ -414,7 +414,7 @@ namespace UnityExplorer.UI
|
|||||||
|
|
||||||
private static void LoadBundle()
|
private static void LoadBundle()
|
||||||
{
|
{
|
||||||
AssetBundle bundle = null;
|
AssetBundle bundle;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Get the Major and Minor of the Unity version
|
// Get the Major and Minor of the Unity version
|
||||||
@ -433,10 +433,10 @@ namespace UnityExplorer.UI
|
|||||||
else
|
else
|
||||||
bundle = LoadBundle("legacy");
|
bundle = LoadBundle("legacy");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch
|
||||||
{
|
{
|
||||||
ExplorerCore.LogWarning($"Exception loading Explorer AssetBundle!");
|
ExplorerCore.LogWarning($"Exception parsing Unity version, falling back to old AssetBundle load method...");
|
||||||
ExplorerCore.Log(ex);
|
bundle = LoadBundle("modern") ?? LoadBundle("legacy.5.6") ?? LoadBundle("legacy");
|
||||||
}
|
}
|
||||||
|
|
||||||
AssetBundle LoadBundle(string id)
|
AssetBundle LoadBundle(string id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user