Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #include "../include/main.hpp"
  2.  
  3. MAKE_HOOK_OFFSETLESS(RefreshContent, void, Il2CppObject* self)
  4. {
  5. RefreshContent(self);
  6. Il2CppObject* PlayButton;
  7. Il2CppObject* PlayButtonText;
  8. if (!il2cpp_utils::GetFieldValue(&PlayButton, self, "_playButton")) {
  9. log(ERROR, "Failed to get field");
  10. }
  11. // PC Version Polyglot.LocalizedTextMeshProUGUI localizer = _button.GetComponentInChildren<Polyglot.LocalizedTextMeshProUGUI>();
  12. Il2CppObject* localizer;
  13. il2cpp_utils::RunMethod(&localizer, PlayButton, "GetComponentInChildren", il2cpp_utils::GetSystemType("Polyglot", "LocalizedTextMeshProUGUI"));
  14. if (localizer != nullptr)
  15. {
  16. il2cpp_utils::RunMethod(il2cpp_utils::GetClassFromName("UnityEngine", "Object"), "Destroy", localizer);
  17. }
  18. if(!il2cpp_utils::RunMethod(&PlayButtonText, PlayButton, "GetComponentInChildren", il2cpp_utils::GetSystemType("TMPro", "TextMeshProUGUI")))
  19. {
  20. log(ERROR, "oopsQSD");
  21. log(ERROR, "oopASDAs2");
  22. }
  23.  
  24. if(!il2cpp_utils::RunMethod(PlayButtonText, "SetText", il2cpp_utils::createcsstr("No Fail!")))
  25. {
  26. log(ERROR, "oops");
  27. }
  28.  
  29. }
  30. extern "C" void load() {
  31. //bugged
  32. INSTALL_HOOK_OFFSETLESS(RefreshContent, il2cpp_utils::FindMethodUnsafe("", "StandardLevelDetailView", "RefreshContent", 0));
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement