Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix class injector abstract method handling #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WNP78
Copy link

@WNP78 WNP78 commented Jun 20, 2024

The class injector does checking on abstract methods to match parameter names and types of implemented methods, but the ParameterInfo struct and hence the name field was removed in newer versions of IL2CPP. This is an easy fix because the IL2CPP API has a method to get the name of a parameter from the MethodInfo and index.

…rsions where Il2CppParameterInfo doesn't exist.
Copy link
Collaborator

@ds5678 ds5678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of simply removing the parameter name check because it's not part of the method signature.

I also think we should add a check for the return type.

@Kasuromi thoughts?

@ds5678 ds5678 added this to the 1.4.6 milestone Jul 15, 2024
@Kasuromi
Copy link
Member

Using the method signature is better to solve this exact issue, though we need to also see about how we'll handle ParameterInfo not being present in newer il2cpp versions.

Either way, if we switch this to use everything that is part of the method signature this would be good for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants