Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 2140899

Browse files
committed
create subfolder for standalone
1 parent 7a8b5b5 commit 2140899

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/ExplorerCore.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ private void SetupEvents()
8282
SceneManager.add_sceneLoaded(new Action<Scene, LoadSceneMode>((Scene a, LoadSceneMode b) => { OnSceneLoaded(); }));
8383
SceneManager.add_activeSceneChanged(new Action<Scene, Scene>((Scene a, Scene b) => { OnSceneLoaded(); }));
8484
}
85-
catch (Exception ex)
85+
catch
8686
{
87-
LogWarning($"Exception setting up Unity event listeners!\r\n{ex}");
87+
// exceptions here are non-fatal, just ignore.
8888
}
8989
#else
9090
Application.logMessageReceived += OnUnityLog;

src/Loader/ExplorerStandalone.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ public string ExplorerFolder
4545
{
4646
if (s_explorerFolder == null)
4747
{
48-
s_explorerFolder = new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath;
49-
s_explorerFolder = Uri.UnescapeDataString(s_explorerFolder);
50-
s_explorerFolder = Path.GetDirectoryName(s_explorerFolder);
48+
s_explorerFolder =
49+
Path.Combine(
50+
Path.GetDirectoryName(
51+
Uri.UnescapeDataString(new Uri(Assembly.GetExecutingAssembly().CodeBase)
52+
.AbsolutePath)),
53+
"UnityExplorer");
54+
55+
if (!Directory.Exists(s_explorerFolder))
56+
Directory.CreateDirectory(s_explorerFolder);
5157
}
5258

5359
return s_explorerFolder;

0 commit comments

Comments
 (0)