This repository was archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Home
Sinai edited this page Jan 31, 2022
·
15 revisions
To use UniverseLib, add the NuGet Package to your project.
UniverseLib has two release files: UniverseLib.IL2CPP.dll which targets .NET 4.7.2, and UniverseLib.Mono.dll which targets .NET 3.5. These files are both included in the same NuGet package.
- Your project should target .NET 4.7.2 or greater, simply add a reference to the NuGet package.
- If your project targets any .NET version less than 4.7.2, simply add a reference to the NuGet package. Universal Mono mods should aim at targeting .NET 3.5 for maximum compatibility with all Unity versions.
- Add the UniverseLib NuGet package.
- Change the
packages.configentry for UniverseLib to usetargetFramework="net35". - Manually change the reference in your
.csprojfile to point to thepackages/UniverseLib.X.X.X/net35/UniverseLib.Mono.dllfile instead of the IL2CPP file. Take note of thenet35folder in the path as well as the.Mono.dllending. - When updating the UniverseLib package, take consideration to your
.csprojfile and make sure it is pointing to the correct version and file, as your IDE may incorrectly change it on updates or not change it at all.
- You will need two build configurations for your project, one for IL2CPP and one for Mono.
- Add the NuGet package.
- Edit your
.csprojfile and change the UniverseLib reference. You will need references in two separate conditionalPropertyGroups so that each configuration targets the correct DLL. For an example project, see BepInExConfigManager or MelonPreferencesManager. - When updating the UniverseLib package, take consideration to your
.csprojfile and make sure it is pointing to the correct versions and files, as your IDE may incorrectly change it on updates or not change it at all.