doanxemnao
Rookie
Hello, I just started learning about hooking. Currently, I am trying to modify the string at PlayerName, but the game always crashes.
Here is my hook code:
Dump:
Here is my hook code:
Code:
monoString* (*old_PlayerName)(void* instance);
monoString* PlayerName(void* instance) {
if(instance!=nullptr) {
return CreateString ("test");
}
}
HOOK_LIB("libil2cpp.so", "0x13d0adc", PlayerName, old_PlayerName);
Code:
// Dll : Assembly-CSharp.dll
// Namespace:
public class PlayerName : MonoBehaviour
{
// Fields
public TextMeshProUGUI textMesh; // 0x20
// Properties
// Methods
// RVA: 0x13d0adc VA: 0x7ba90e6adc
private Void Update() { }
// RVA: 0x13d0b54 VA: 0x7ba90e6b54
public Void .ctor() { }
}