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

[Bug]: Possible incompatibility of Il2CppInterop with generated assemblies #651

Closed
5 of 7 tasks
Seva167 opened this issue May 22, 2024 · 1 comment
Closed
5 of 7 tasks
Labels
Bug / Issue Something isn't working Completed User Support This post was made to ask about an issue the user is having

Comments

@Seva167
Copy link

Seva167 commented May 22, 2024

All of the following criteria must be met

  • All Requirements must be installed.
  • Changed the title so that it doesn't just says "[Bug]: "
  • I have searched the GitHub issues for my bug, even in the closed issues.

All of the following are optional to answer

  • Tried reinstalling the Game.
  • Tried reinstalling MelonLoader.
  • Tried restarting PC.
  • Was able to see the Start Screen.

Describe the issue.

Latest.log
This issue occured when i tried to register class in Il2Cpp that inherits from ingame Il2Cpp type.
Ingame type had virtual method with arguments that have ingame Il2Cpp type.
It looks like all ingame types are in "Il2Cpp" namespace when referencing generated assembly: Il2Cpp.CubeConnector, Assembly-CSharp, while Il2CppInterop ClassInjector tries to find type name and ignores that: CubeConnector, Assembly-CSharp

I fixed it with this patch:

[HarmonyPatch(typeof(ClassInjector), "GetIl2CppTypeFullName")]
internal static class ClassInjectorPatch
{
    public static void Postfix(ref string __result)
    {
        if (__result.Contains("Assembly-CSharp"))
        {
            __result = "Il2Cpp." + __result;
            MelonLogger.Msg(__result);
        }
    }
}

Did you attach your log file?

Yes, I attached my log file to the text box above.

@HerpDerpinstine HerpDerpinstine added Bug / Issue Something isn't working Work-in-Progress This issue or pull request is being worked on currently User Support This post was made to ask about an issue the user is having labels Jun 14, 2024
@HerpDerpinstine HerpDerpinstine added Completed and removed Work-in-Progress This issue or pull request is being worked on currently labels Jun 29, 2024
@HerpDerpinstine
Copy link
Member

Should be fixed in the upcoming v0.6.5 update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Issue Something isn't working Completed User Support This post was made to ask about an issue the user is having
Projects
None yet
Development

No branches or pull requests

2 participants