Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.
rainbowblood edited this page May 9, 2023 · 15 revisions

Using the NuGet package

To use UniverseLib, add the NuGet Package(s) to your project.

UniverseLib has two NuGet packages:

If your mod only targets either IL2CPP or Mono (but not both), simply add a reference to the relevant NuGet package, the rest of this article is not applicable to you.

Universal Mono+IL2CPP projects

If you are building a mod which targets both Mono and IL2CPP, you will need separate build configurations for each target.

For dotnet SDK-style projects, simply put each PackageReference in conditional ItemGroups. This example is assuming your build configurations are called IL2CPP and Mono, change that as needed.

<!-- IL2CPP NuGet -->
<ItemGroup Condition="'$(Configuration)'=='IL2CPP'">
    <PackageReference Include="rainbowblood.UniverseLib.IL2CPP" Version="2.*" />
</ItemGroup>
<!-- Mono NuGet -->
<ItemGroup Condition="'$(Configuration)'=='Mono'">
    <PackageReference Include="rainbowblood.UniverseLib.Mono" Version="2.*" />
</ItemGroup>