Il2Cpp-Modding-Codegen icon indicating copy to clipboard operation
Il2Cpp-Modding-Codegen copied to clipboard

Resolve Vtable slot issue with generic base class

Open RedBrumbler opened this issue 2 years ago • 0 comments

if the base class of a type is generic, and that is the type that a vtable slot needs to be resolved for, the generic parameter is lost in the source file, example:

// header
class A : B<float> {
    void thing();
}

// source
void A::thing() {
    ...
    ___internal__method = resolveVtableSlot(this, classof(B<T>*));
    ...
}

obviously this is very simplified but I hope this makes the issue clear enough to understand.

the B<T>* should obviously be B<float>* there.

RedBrumbler avatar May 19 '22 14:05 RedBrumbler