Results 10 comments of 遂沫

使用方式请参考 https://github.com/1992724048/SausageManCheat/blob/master/GPP32/.class/CameraController/CameraController.h

至于性能方面,所有获取和初始化都是一次性的,对性能影响几乎没有

至于你修改过的,每次都去获取一遍性能会更差,没有特殊需求的话,请在初始化时获取对应的函数指针,再在需要时调用

> 你这是win端的当然是没啥性能的关系,但是在移动端还是一开始就把所有类 方法 都解析一遍 明显能看出来进游戏速度慢了很多 请使用异步操作

建议在游戏运行后注入,一次性初始化后对后面执行没有任何的性能影响,但实时获取就不一样了

可以尝试 static Method* method = class_->Get("Update"); method->Invoke(...);

问题在这,每次都获取开销会很大 ```c++ [[nodiscard]] auto tryMethod(const std::string &name, const std::vector &args = {}) const { UnityResolve::Class clazz(this->Il2CppClass.klass); return clazz.Get(name, args); } ``` ```c++ explicit Class(void* pClass){ this->address = pClass; this->name =...

推荐 ```c++ static Method* method = class_->Get("Update"); method->Invoke(...); ``` 和 ```c++ MethodPointer update; class_->Get("Update")->Cast(update); ``` 的原因就是直接通过函数指针调用,而不需要其他多余的处理方式

转成汇编也就差不多两行开销, arm可能会多一点但总体不会超过10行 ```asm mov rcx, qword ptr ds:[rcx+0x30] call rcx ```