From 1cc431f16b622e749188441dd491ac50b1847566 Mon Sep 17 00:00:00 2001 From: NctimeAza <102260794+NctimeAza@users.noreply.github.com> Date: Sat, 3 Sep 2022 05:48:26 +0800 Subject: [PATCH] fix HideUI bug --- cheat-library/src/user/cheat/visuals/HideUI.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cheat-library/src/user/cheat/visuals/HideUI.cpp b/cheat-library/src/user/cheat/visuals/HideUI.cpp index 83011c5..4983d3f 100644 --- a/cheat-library/src/user/cheat/visuals/HideUI.cpp +++ b/cheat-library/src/user/cheat/visuals/HideUI.cpp @@ -22,7 +22,7 @@ namespace cheat::feature void HideUI::DrawMain() { - ConfigWidget(f_Enabled, "Hide in-game UI."); + ConfigWidget(f_Enabled, "Hide in-game UI.\nWhen you switch to another scene (e.g. into Domains), turn off and re-enable this feature"); } bool HideUI::NeedStatusDraw() const @@ -47,15 +47,17 @@ namespace cheat::feature { if (ui_camera == nullptr) ui_camera = app::GameObject_Find(string_to_il2cppi("/UICamera"), nullptr); - - + if (ui_camera) app::GameObject_SetActive(ui_camera, false, nullptr); } else { if (ui_camera) + { app::GameObject_SetActive(ui_camera, true, nullptr); + ui_camera = nullptr; + } } } } \ No newline at end of file