fix HideUI exception error and unable to re-enable

This commit is contained in:
Joaquin 2022-09-02 18:51:10 -06:00
parent 00e5f36417
commit 2382020990

View File

@ -48,16 +48,18 @@ namespace cheat::feature
if (ui_camera == nullptr)
ui_camera = app::GameObject_Find(string_to_il2cppi("/UICamera"), nullptr);
if (ui_camera)
if (ui_camera->fields._.m_CachedPtr != nullptr)
app::GameObject_SetActive(ui_camera, false, nullptr);
}
else
{
if (ui_camera)
{
app::GameObject_SetActive(ui_camera, true, nullptr);
{
if (ui_camera->fields._.m_CachedPtr != nullptr)
app::GameObject_SetActive(ui_camera, true, nullptr);
ui_camera = nullptr;
}
}
}
}
}