Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Use Assembly.LoadFrom to ensure interop assemblies are loaded#9

Open
Kasuromi wants to merge 2 commits intosinai-dev:mainfrom
Kasuromi:main
Open

Use Assembly.LoadFrom to ensure interop assemblies are loaded#9
Kasuromi wants to merge 2 commits intosinai-dev:mainfrom
Kasuromi:main

Conversation

@Kasuromi
Copy link

Context

Assembly.LoadFile will load the assembly in a new AssemblyLoadContext, which causes unexpected behavior on Il2CppInterop (& Unhollower)

A similar issue was recently resolved on BepInEx

Relevant issues

sinai-dev/UnityExplorer#158

it is finding two types called Il2CppSystem.Byte in Il2Cppmscorlib

Due to UniverseLib accidentally loading a second Il2Cppmscorlib into the runtime, Il2CppInterop fails on the Single call due to there being more than one assembly.

@grimkor
Copy link

grimkor commented Jan 8, 2023

Hey just want to chime in and say this fixed an issue I was having with BepInEx IL2CPP plugin I was working on. Compiled the forked version @Kasuromi made and worked like a charm.

Is there any possibility of merging this fix for other users who might not find this alternate solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants