Background

Unity3D (or UnityAssemblies) is an open-source NuGet package that I started in 2019. Oh, and Unity® and the Unity logo are trademarks of Unity Technologies.

Having worked with the .NET stack since ~2014, I was always frustrated when Unity's builtin Mono compiler didn't allow me to use the latest .NET Standard APIs or C# language features, especially after C# 6.0 dropped with great features like nameof and null-conditional operators. To get around these limitations, I started writing my C# scripts in Visual Studio instead, then exporting the compiled DLLs to my Unity projects with an MSBuild post-build event (this was actually the subject of my GDEX 2019 talk.)

I came to realize that this setup actually had a number of benefits:

The last benefit is what led me to create the Unity3D NuGet package. Unity programmers like me could create Visual Studio solutions for their scripts, add this package, and then they would have access to all of Unity's assemblies via MSBuild targets/properties. The Why Another NuGet Package for Unity? section of the project's README expands on other packages that I considered and why I found them insufficient. And I think others agreed! As of this writing in 2024, my package has ~100 stars on GitHub and is easily my best-managed open source project, while those other packages are no longer maintained.

Technical Details

I am proud of several technical details in this library: