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

ClassInjector.SystemTypeFromIl2CppType fails when types are prefixed. #135

Open
WNP78 opened this issue Jun 20, 2024 · 2 comments · May be fixed by #153
Open

ClassInjector.SystemTypeFromIl2CppType fails when types are prefixed. #135

WNP78 opened this issue Jun 20, 2024 · 2 comments · May be fixed by #153
Labels
bug Something isn't working injection

Comments

@WNP78
Copy link
Contributor

WNP78 commented Jun 20, 2024

ClassInjector.SystemTypeFromIl2CppType finds types by querying IL2CPP for their full name and assembly name and then using the managed Type.GetType on a string constructed from it, which fails when they have the Il2Cpp prefix added to them. I made a hacky fix, which just tries adding Il2Cpp if it fails without it, but there should probably be a better way that somehow checks if it's being prefixed.

@ds5678
Copy link
Collaborator

ds5678 commented Jul 15, 2024

I am open to reviewing pull requests that resolve this.

@ds5678 ds5678 added bug Something isn't working injection labels Jul 15, 2024
@ds5678 ds5678 changed the title ClassInjector.SystemTypeFromIl2CppType fails when types are prefxied. ClassInjector.SystemTypeFromIl2CppType fails when types are prefixed. Jul 15, 2024
@ds5678
Copy link
Collaborator

ds5678 commented Jul 15, 2024

Enums currently have an original name attribute (when their namespace is prefixed). I would be open to expanding that to all types which had their namespace prefixed.

@ds5678 ds5678 added this to the 1.5.0 milestone Sep 8, 2024
@ds5678 ds5678 removed this from the 1.5.0 milestone Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working injection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants