Hello all! I am using frida-il2cpp-bridge for an android game written in Unity/Mono. I am trying to figure out how to get the text associated with GameObjects (PlayerName, NameLabel, LevelLabel, etc.) that I can see using gc:
This gives me output such as:
I would like to get the text of something, such as PlayerName. From what I have learned, GameObject's should have a GetComponent that might do this, however, you need a type. I do not know the type to provide for these. Maybe there is another method to achieve this? Thank you!
import "frida-il2cpp-bridge";
Il2Cpp.perform(() => {
const CoreModule = Il2Cpp.domain.assembly("UnityEngine.CoreModule").image;
const Transform = CoreModule.class("UnityEngine.Transform");
const GameObject = CoreModule.class("UnityEngine.GameObject");
Il2Cpp.gc.choose(Transform).forEach((instance: Il2Cpp.Object) => {
console.log(instance);
});
});
This gives me output such as:
chatTagName (UnityEngine.RectTransform)
TipsNum (UnityEngine.RectTransform)
Text (TMP) (UnityEngine.RectTransform)
CountText (UnityEngine.RectTransform)
PlayerName (UnityEngine.RectTransform)
I would like to get the text of something, such as PlayerName. From what I have learned, GameObject's should have a GetComponent that might do this, however, you need a type. I do not know the type to provide for these. Maybe there is another method to achieve this? Thank you!