Solved How To Fix This Hook

CelestineMapu

Approved Modder
Approved Modder
Hi Friends, can you help me to fix this code, when i try to compile it shows error says "declaration of variabel 'UnityEngine' with deduced type 'auto' requires initializer"
It's an auto hook, i think the problem is the dot in "UnityEngine.Camere" coz i tried to hook a sealed class
auto UnityEngine.Camera = new LoadClass("", OBFUSCATE("UnityEngine.Camera"));
DWORD get_fieldOfView = UnityEngine.Camera->GetMethodOffsetByName(OBFUSCATE("get_fieldOfView"), 0);
A64HookFunction((void *)("libcsharp.so", get_fieldOfView), (void *) _DroneView, (void **) &oDroneView);
 
Last edited:
UnityEngine is the namespace, Camera is the class name.

what you did wrong: putting the namespace with the class name, where only the class should be. See that first set of empty quotes you have in your LoadClass function? That needs to have your namespace. Your second parameter needs to only have the Class name.
 
UnityEngine is the namespace, Camera is the class name.

what you did wrong: putting the namespace with the class name, where only the class should be. See that first set of empty quotes you have in your LoadClass function? That needs to have your namespace. Your second parameter needs to only have the Class name.
Yes I've found that, btw thanks for explain it to me ❤️
 
Back
Top Bottom