[BepInEx 6] [Il2Cpp] Is there a way to *add* new (Unity) assemblies? #768
Unanswered
DaXcess
asked this question in
Help and Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been modding with BepInEx and Unity Mono for a couple of months now, and I eventually want to tackle Il2Cpp games using BepInEx 6 (whether it's a good idea or not doesn't matter to me, I'm aware 6.x is still in development).
One of the things I have had to do with modding in Unity Mono was adding additional Unity packages into a game (e.g. the new input system (Unity.InputSystem.dll), XR modules, etc). In mono, this is pretty straightforward, as you'd only have to dump the DLL inside the plugins folder and it will work fine (where the DLL was extracted from a dummy game using the same Unity version).
Now with Il2Cpp, this gets a little more complicated. On first launch, it seems that BIE 6 sort of "unhollows" the game and dumps the assemblies (not only Assembly-CSharp.dll, but also modules used like the render pipeline, input system, etc) as dummy assemblies, so that you can reference them in your mod.
So my question here is: Is it possible to add an assembly (e.g. an XR module) to this output? I have tried numerous things to achieve a simple demo, but was only able to succeed if I compiled my test Il2Cpp game with the modules pre-bundled. If I try to achieve the same using only the base game and just referencing the modules (even though they don't exist) in my mod, the game either crashes (which is not surprising), or complains that the referenced assembly has "not been loaded by Il2Cpp".
I'm curious to hear what you folks think about this. It might just be plainly impossible, it might not be.
Beta Was this translation helpful? Give feedback.
All reactions