This tiny command line tool lets you use a "dummy" .NET Standard 2.0 library to pull the required NuGet libraries and their dependencies together, and move them over to your Unity project. Featuring...
- automatic link.xml generation for IL2CPP builds!
- use Visual Studio to manage NuGet packages!
- no need to add any additional files into your Unity project!
You must have .NET Core 2.1 SDK or higher installed.
⚠ 👉 Yes, the SDK, not just the runtime, as toitnups relies on the dotnet ...
commands.
You can quickly install and try toitnups from nuget.org using the following commands:
dotnet tool install -g toitnups
[navigate to your Unity project directory]
toitnups init
toitnups add sample Plugins\Sample
[add your nuget packages]
toitnups push
Note: You may need to open a new command/terminal window the first time you install the tool.
This wouldn't be strictly necessary, but I think it's best to validate the project version and folder structure. If everything is in order the .tn
folder is created.
The dotnet toolchain runs to create a .NET Standard 2.0 project and a config file is created that stores the location of the plugins inside the Assets
folder.
... and add the needed NuGet references via Visual Studio as you normally would.
The dotnet toolchain runs again, publishing the project in release mode. This copies all the necessary files to one folder. Then these files are gathered, copied over to the target folder, and the link.xml
file is created/updated, ensuring that none of the code is removed by the sometimes too eager IL2CPP backend.
If you specify an integration name after push
, e.g. toitnups push sample
it'll only update that integration. If the name is omitted then all the integrations are updated.
It removes an integration, essentially the opposite of add
.
⚠ 👉 Important to note, that this does not remove any files from the Unity project.
There are multiple factors here.
- The asset store NuGet package manager is separately maintained/implemented, therefore it's always going to lag behind any official implementation and have more bugs/issues.
- I strongly believe that Unity's way to extend the editor is wrong. I shouldn't have to add assets/packages to my project to extend the editor.
- This tool automates the hurdles with
link.xml
.
Tool fOr unITy NUget PackageS