Skip to content

Support prefixed types in ClassInjector.SystemTypeFromIl2CppType#153

Merged
ManlyMarco merged 1 commit intoBepInEx:masterfrom
ds5678:system-type-from-il2cpp-type-fix
Sep 2, 2025
Merged

Support prefixed types in ClassInjector.SystemTypeFromIl2CppType#153
ManlyMarco merged 1 commit intoBepInEx:masterfrom
ds5678:system-type-from-il2cpp-type-fix

Conversation

@ds5678
Copy link
Collaborator

@ds5678 ds5678 commented Sep 8, 2024

Resolves #135

@ds5678 ds5678 added this to the 1.5.0 milestone Sep 8, 2024
@ds5678 ds5678 requested a review from Kasuromi September 8, 2024 16:22
@js6pak
Copy link
Member

js6pak commented Sep 10, 2024

ClassInjector.RewriteType already tries to tackle the Il2Cpp prefix but only does so for the System.* types. It also only works for types that have a non-prefixed version which no longer has to be the case since #39.
Thinking about it more I think RewriteType is inherently flawed and it should actually just operate on the Il2CppTypeStruct not System.Types.

@ds5678 ds5678 force-pushed the system-type-from-il2cpp-type-fix branch 2 times, most recently from 4841da9 to 89e48dc Compare September 14, 2024 16:24
@js6pak js6pak marked this pull request as draft September 14, 2024 17:51
@ds5678 ds5678 force-pushed the system-type-from-il2cpp-type-fix branch from 89e48dc to 22611e8 Compare September 14, 2024 19:09
@ds5678 ds5678 force-pushed the system-type-from-il2cpp-type-fix branch from 22611e8 to 7da7b67 Compare October 5, 2024 12:45
@ds5678 ds5678 removed this from the 1.5.0 milestone Oct 5, 2024
@ds5678 ds5678 force-pushed the system-type-from-il2cpp-type-fix branch from 7da7b67 to 2225a1a Compare October 6, 2024 14:26
@ITR13
Copy link

ITR13 commented Aug 31, 2025

Can confirm that this fixes an bug similar to #135 in another game/mod. The bug occurred for me on MelonLoader 0.7.1, which uses Il2CppInterop 1.5.0-ci.625.

@ds5678 ds5678 marked this pull request as ready for review September 2, 2025 04:38
@ds5678
Copy link
Collaborator Author

ds5678 commented Sep 2, 2025

As a temporary fix until v2

@ds5678 ds5678 added this to the 1.5.1 milestone Sep 2, 2025
@ManlyMarco ManlyMarco merged commit 400ad63 into BepInEx:master Sep 2, 2025
@ds5678 ds5678 deleted the system-type-from-il2cpp-type-fix branch September 2, 2025 06:42
XtraCube pushed a commit to XtraCube/Il2CppInterop that referenced this pull request Sep 18, 2025
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.

ClassInjector.SystemTypeFromIl2CppType fails when types are prefixed.

4 participants