diff --git a/Il2CppInterop.Runtime/Injection/ClassInjector.cs b/Il2CppInterop.Runtime/Injection/ClassInjector.cs index e287a086..6db08110 100644 --- a/Il2CppInterop.Runtime/Injection/ClassInjector.cs +++ b/Il2CppInterop.Runtime/Injection/ClassInjector.cs @@ -359,14 +359,13 @@ static void FindAbstractMethods(List list, INativeClass { if (Marshal.PtrToStringAnsi(m.Name) != name) return false; if (m.ParametersCount != baseMethod.ParametersCount) return false; + if (GetIl2CppTypeFullName(m.ReturnType) != GetIl2CppTypeFullName(baseMethod.ReturnType)) return false; for (var i = 0; i < m.ParametersCount; i++) { var parameterInfo = UnityVersionHandler.Wrap(baseMethod.Parameters, i); var otherParameterInfo = UnityVersionHandler.Wrap(m.Parameters, i); - if (Marshal.PtrToStringAnsi(parameterInfo.Name) != Marshal.PtrToStringAnsi(otherParameterInfo.Name)) return false; - if (GetIl2CppTypeFullName(parameterInfo.ParameterType) != GetIl2CppTypeFullName(otherParameterInfo.ParameterType)) return false; }