Issues overwriting implementation #249
Unanswered
sanktanglia
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
-
I have the following class
class WebSocket4Net.Common.StringCommandInfo : WebSocket4Net.Common.CommandInfo<System.String>
{
System.String[] k__BackingField; // 0x20
System.Void .ctor(System.String key, System.String data, System.String[] parameters); // 0x028b09c0
System.String[] get_Parameters(); // 0x0038fef0
System.Void set_Parameters(System.String[] value); // 0x0038ff10
System.String GetFirstParam(); // 0x028b0950
System.String get_Item(System.Int32 index); // 0x028b0a40
}
Im currently doing
const CoreModule = Il2Cpp.Domain.assembly("WebSocket4Net").image;
//console.log(CoreModule.classes);
var klass = CoreModule.class("WebSocket4Net.Common.StringCommandInfo");
klass.method("get_Parameters").implementation = function (): Il2Cpp.Array<Il2Cpp.String>
{
console.log('called ' + this);
var orig = this.method('get_Parameters').invoke();
return orig as Il2Cpp.Array<Il2Cpp.String>;
}
But im getting errors like
[{'type': 'error', 'description': "\x1b[0m\x1b[38;5;9mil2cpp\x1b[0m: couldn't find method get_Parameters in StringWriter, did you mean .ctor?"}] => None
which suggests this isnt of the correct type? im not sure how to tell whats going on here
Beta Was this translation helpful? Give feedback.
All reactions