UnityToolkit gives SPT client modders a shared set of libraries for asynchronous work, native collections, dependency injection, LINQ, and string building. It was created by Arys; this fork is maintained by Tylevo.
UnityToolkit 2.0.2 supports SPT 4.1.5. Startup was verified: the corrected prepatcher loaded its adjacent companion and UnityToolkit 2.0.2 initialized successfully. The tester reported no issues. Both builds and all four isolated prepatcher tests also passed.
The plugin is rebuilt against SPT 4.1.5 references. The old 2.0.1 plugin referenced SPT 4.0.1, which caused SPT 4.1's startup version check to reject it.
This version also fixes the prepatcher's companion lookup. It previously treated its own DLL filename as a directory and could silently skip loading System.Runtime.CompilerServices.Unsafe.dll. It now finds that library beside the prepatcher DLL, including when the game is started from a different working directory.
The public API and plugin GUID are unchanged. The companion libraries have not been upgraded. See the changelog for the complete changes and release notes for validation details.
Download the installable ZIP from the 2.0.2 release. GitHub's source-code archives are for development and do not contain a complete installation.
-
Close SPT and the launcher.
-
Extract the complete ZIP into your SPT 4.1.5 folder and replace the existing UnityToolkit files when prompted.
-
Keep one UnityToolkit installation in these locations:
BepInEx/plugins/UnityToolkit/ BepInEx/patchers/UnityToolkit/
Install both folders, including their companion DLLs and notices. UnityToolkit is a standalone dependency shared by the mods that use it; it does not require any particular consuming mod. Compatibility with every dependent mod has not been verified.
| Library | Used for |
|---|---|
| UniTask | Async/await and coroutine alternatives suited to Unity. |
| Unity.Collections | Native container types for Unity code and jobs. Follow the library's allocation and job-safety rules. |
| VContainer | Dependency injection for C# classes and Unity components. |
| ZLinq | LINQ operations through value enumerables. |
| ZString | String building with reduced allocations. |
The package also includes UnityToolkit's prepatcher and its Unsafe companion library. The linked documentation describes the libraries; APIs available to your mod depend on the versions included in the package.
Copy the assemblies from the release into your project's reference folder, then add references to UnityToolkit and the companion libraries your mod uses. Declare the dependency on your BepInEx plugin class:
[BepInDependency("com.arys.unitytoolkit", "2.0.2")]Use the BepInEx namespace for this attribute. Players must install the complete UnityToolkit package alongside your mod. The dependency GUID remains com.arys.unitytoolkit.
For source builds and local reference setup, see BUILDING.md. The prepatcher test guide explains how to run the isolated regression tests.
UnityToolkit is by Arys and retains its original MIT license. Tylevo maintains this SPT 4.1.5 update. The companion libraries retain their authorship and licenses, with full notices included in both installation folders.