Unturned's managed assemblies (Assembly-CSharp.dll, com.rlabrecque.steamworks.net.dll, UnturnedDat.dll, the SDG/Unity dependencies, and the API XML docs), packaged for NuGet and refreshed automatically each time Unturned ships a new build. Reference a package instead of hand-copying DLLs out of the game's Managed folder after every patch. They're plain Unturned assemblies, useful in any Unturned project — RocketMod or OpenMod plugins, standalone tools, client mods, datamining — not just RocketMod (the RocketModFix prefix is only the maintainer).
Redistributed with permission. Nelson Sexton (Smartly Dressed Games) gave explicit written approval to distribute Unturned's libraries — see issue #8.
dotnet add package RocketModFix.Unturned.Redist.Serveror in your .csproj:
<PackageReference Include="RocketModFix.Unturned.Redist.Server" Version="x.y.z" />Pin an exact version — don't float. Some older preview builds were published as
3.26.3.107/3.26.4.100(and…-previewof those), which sort above today's3.26.3.x. They're unlisted, but NuGet ignores listing when resolving floating versions, soVersion="*","*-*"or"3.26.*"still restores those stale builds.
Choose by side (client or server). Use a .Publicized variant when your plugin needs to touch private/internal members — their visibility is rewritten to public.
| Package | For |
|---|---|
| Client-side tools and mods | |
| Server-side plugins and tools | |
| Client mods that need non-public members | |
| Server plugins that need non-public members |
Add AllowUnsafeBlocks to your plugin's .csproj:
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>The publicized DLL is a compile-time reference only. At runtime your plugin loads inside Unturned, which has its own original Assembly-CSharp.dll where those members are still private. Unturned runs on Mono, and AllowUnsafeBlocks is what lets the Mono runtime skip the access check for them: it makes the compiler mark your assembly with SecurityPermission(SkipVerification), and Mono's JIT doesn't check member access for code in an assembly marked that way. Without it you'll hit runtime errors like:
Field `SDG.Unturned.Provider:isDedicatedUGCInstalled' is inaccessible from method ...
Things to know:
- The flag is per assembly. Every DLL that touches publicized members needs it — including helper libraries you ship in
Rocket/Libraries— and it must survive any ILRepack/obfuscation step. - It only covers compiled code.
dynamicand reflection-based serializers (e.g.XmlSerializerover a type that uses a non-public game type) still apply their own public-only checks. - Non-public members change more often than public ones. After a game update a renamed private member shows up as
MissingFieldException/MissingMethodExceptionwhen your method is first run, so rebuild against the redist version that matches your server. Privateconstvalues are copied into your DLL at compile time.
virtual/abstract members are intentionally not publicized — they keep their original accessibility, so you can still override them normally (e.g. protected override void execute(...) on a Command). Publicizing them would force the override to be public, which the compiler rejects with "cannot change access rights".
All four packages carry two streams under the same package id:
- Stable — Unturned's default branch, versioned
x.y.z.n. - Preview — Unturned's
previewbranch, published as a prereleasex.y.z.n-preview<build>. Enable "include prerelease" in your NuGet client to pull it.
The standalone …Client-Preview and …Server-Preview packages are obsolete. They are no longer published; switch to …Client / …Server and enable prerelease for preview builds.
RocketModFix.Unturned.Redist.Example is a small, runnable RocketMod plugin showing how to consume these packages in practice — including a side-by-side comparison of reading a non-public member via reflection (the plain redist) vs. a .Publicized package (a plain, compile-checked field access), plus how to drop the built DLL on a server and confirm it loads.
Everything runs on GitHub Actions, with no external servers. A scheduled job watches Steam for new Unturned builds; when one lands it downloads the build, repackages the managed DLLs, and opens a pull request. The PR is validated (files present, hashes match, version not a downgrade) and auto-merged, which publishes the affected package to NuGet.
📖 ARCHITECTURE.md has the full picture: the workflows, the variant matrix in .github/variants.json, how the 4 Steam sources map to 8 directories and 4 packages, and how to add a variant.