How do i get field value from class that are not initialized at the game start #573
Unanswered
RaidenRespawnStaff
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
` const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
const VerifyClass = csharpAssembly.image.class("Game.invManager.Data");
const VerifyInstance = VerifyClass.field<Il2Cpp.Object>("Instance").value;
const Field = VerifyInstance.field<Il2Cpp.Object>("Items").value;
console.log(JSON.stringify({ VerifyClass, VerifyInstance, Field}));
console.log(Field.field.toString);
console.log(Field.toString);
console.log(Field.field.name);`
I tried this but i always get this :
Error: access violation accessing 0x0
I think the class instance doesnt exist when i launch the game so i need to "wait" for it to initialize before reading the value but i cant find how to do it
I kinda want to do this
`
const csharpAssembly = Il2Cpp.domain.assembly("Assembly-CSharp");
const VerifyClass = csharpAssembly.image.class("Game.invManager.Data");
IF CLASS IS CALLED THEN
const VerifyInstance = VerifyClass.field<Il2Cpp.Object>("Instance").value;
const Field = VerifyInstance.field<Il2Cpp.Object>("Items").value;
console.log(JSON.stringify({ VerifyClass, VerifyInstance, Field}));
console.log(Field.field.toString);
console.log(Field.toString);
console.log(Field.field.name);
IF END
`
Beta Was this translation helpful? Give feedback.
All reactions