Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "../include/main.hpp"
- MAKE_HOOK_OFFSETLESS(RefreshContent, void, Il2CppObject* self)
- {
- RefreshContent(self);
- Il2CppObject* PlayButton;
- Il2CppObject* PlayButtonText;
- if (!il2cpp_utils::GetFieldValue(&PlayButton, self, "_playButton")) {
- log(ERROR, "Failed to get field");
- }
- // PC Version Polyglot.LocalizedTextMeshProUGUI localizer = _button.GetComponentInChildren<Polyglot.LocalizedTextMeshProUGUI>();
- Il2CppObject* localizer;
- il2cpp_utils::RunMethod(&localizer, PlayButton, "GetComponentInChildren", il2cpp_utils::GetSystemType("Polyglot", "LocalizedTextMeshProUGUI"));
- if (localizer != nullptr)
- {
- il2cpp_utils::RunMethod(il2cpp_utils::GetClassFromName("UnityEngine", "Object"), "Destroy", localizer);
- }
- if(!il2cpp_utils::RunMethod(&PlayButtonText, PlayButton, "GetComponentInChildren", il2cpp_utils::GetSystemType("TMPro", "TextMeshProUGUI")))
- {
- log(ERROR, "oopsQSD");
- log(ERROR, "oopASDAs2");
- }
- if(!il2cpp_utils::RunMethod(PlayButtonText, "SetText", il2cpp_utils::createcsstr("No Fail!")))
- {
- log(ERROR, "oops");
- }
- }
- extern "C" void load() {
- //bugged
- INSTALL_HOOK_OFFSETLESS(RefreshContent, il2cpp_utils::FindMethodUnsafe("", "StandardLevelDetailView", "RefreshContent", 0));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement