Update unity.js

This commit is contained in:
iddoeldor 2018-08-07 19:34:16 +03:00 committed by GitHub
parent 1913fdc7d9
commit bc3997d8e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,9 +26,9 @@ function cb(funcName) {
} }
function hookMethod(dll, klass, method, extra) { function hookMethod(dll, klass, method, extra) {
var monoImage = mono_image_loaded(dll); // var monoImage = mono_image_loaded(dll);
// monoImage will be the same as this.extra.image // monoImage will be the same as this.extra.image
var monoClass = mono_class_from_name(monoImage, "", klass); var monoClass = mono_class_from_name(extra.image, "", klass);
var monoMethod = mono_class_get_method_from_name(monoClass, method, -1); var monoMethod = mono_class_get_method_from_name(monoClass, method, -1);
// = mono_class_get_method_from_name(monoClass, "lastRecivedGameId", -1); // mono_class_get_field // = mono_class_get_method_from_name(monoClass, "lastRecivedGameId", -1); // mono_class_get_field
var compiledMethod = mono_compile_method(monoMethod); var compiledMethod = mono_compile_method(monoMethod);
@ -37,7 +37,7 @@ function hookMethod(dll, klass, method, extra) {
Interceptor.attach(compiledMethod, cb("compiledMethod")); Interceptor.attach(compiledMethod, cb("compiledMethod"));
Object.assign(extra, { Object.assign(extra, {
MonoImage: monoImage, //MonoImage: monoImage,
MonoClass: monoClass, MonoClass: monoClass,
monoMethod: monoMethod, monoMethod: monoMethod,
compiledMethod: compiledMethod compiledMethod: compiledMethod
@ -153,7 +153,6 @@ Java.perform(awaitForCondition(hook));
/* /*