mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 14:17:51 +08:00
Update README.md, hide Console when it fails to init
This commit is contained in:
parent
de663f34b2
commit
1d07046a74
@ -12,6 +12,8 @@
|
||||
</a>
|
||||
|
||||
<img src="https://img.shields.io/github/downloads/sinai-dev/CppExplorer/total.svg" />
|
||||
|
||||
[Looking for a Mono version?](https://github.com/sinai-dev/MonoExplorer)
|
||||
</p>
|
||||
|
||||
### Known issues
|
||||
|
@ -21,8 +21,9 @@ namespace Explorer
|
||||
Pages.Add(new SearchPage());
|
||||
Pages.Add(new ConsolePage());
|
||||
|
||||
foreach (var page in Pages)
|
||||
for (int i = 0; i < Pages.Count; i++)
|
||||
{
|
||||
var page = Pages[i];
|
||||
page.Init();
|
||||
}
|
||||
}
|
||||
@ -30,7 +31,7 @@ namespace Explorer
|
||||
public const int MainWindowID = 5000;
|
||||
public static Rect MainRect = new Rect(5,5, ModConfig.Instance.Default_Window_Size.x,ModConfig.Instance.Default_Window_Size.y);
|
||||
|
||||
private static readonly List<WindowPage> Pages = new List<WindowPage>();
|
||||
public static readonly List<WindowPage> Pages = new List<WindowPage>();
|
||||
private static int m_currentPage = 0;
|
||||
|
||||
public static void SetCurrentPage(int index)
|
||||
|
@ -58,7 +58,9 @@ MelonLogger.Log(""hello world"");";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MelonLogger.Log($"Error setting up console!\r\nMessage: {e.Message}\r\nStack: {e.StackTrace}");
|
||||
MelonLogger.Log($"Error setting up console!\r\nMessage: {e.Message}");
|
||||
MainMenu.SetCurrentPage(0);
|
||||
MainMenu.Pages.Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user