Closed qiaozhi-4 closed 1 year ago
I want to get an instance of this object, but I don't know how to create it. Here is the constructor for this class
I do this step and I don't know how to go down, okay
https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/master/src/il2cpp/structs/class.ts#L211
Try
let v3clazz = Il2Cpp.Domain.assembly('UnityEngine.CoreModule').image.class('UnityEngine.Vector3');
let v3obj = v3class.alloc();
v3obj.method('.ctor').invoke(x, y, z);
To create a new one.
To change existing objects you access the property with .field
let v3obj = v3clazz.method('get_one').invoke();
v3obj.field('x').value = 2.0;
https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/master/src/il2cpp/structs/class.ts#L211
尝试
let v3clazz = Il2Cpp.Domain.assembly('UnityEngine.CoreModule').image.class('UnityEngine.Vector3'); let v3obj = v3class.alloc(); v3obj.method('.ctor').invoke(x, y, z);
创造一个新的。
要更改现有对象,您可以使用
.field
let v3obj = v3clazz.method('get_one').invoke(); v3obj.field('x').value = 2.0;
Thank you. Try it right away.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/master/src/il2cpp/structs/class.ts#L211
试一试
let v3clazz = Il2Cpp.Domain.assembly('UnityEngine.CoreModule').image.class('UnityEngine.Vector3'); let v3obj = v3class.alloc(); v3obj.method('.ctor').invoke(x, y, z);
创造一个新的。
要更改现有对象,您可以使用
.field
let v3obj = v3clazz.method('get_one').invoke(); v3obj.field('x').value = 2.0;
Thank you. It's done