The Forge is currently under heavy construction. Expect nothing to work. Data is reset every hour.

Mod Details

UnityToolkit

UnityToolkit 1.2.0

Created by Arys

177.3K Downloads

SPT 3.10.5 Compatible

A framework library for client modders to make writing efficient, allocation-free code easier.

What is this library for?

This library aims to provide additional tools to client modders which will (hopefully) allow them to write more optimised code and reduce the performance cost and memory allocation of their code even further.

How to install this library (For users):

  1. Download the latest release
  2. Open the .7z file with 7-Zip
  3. Drag and drop the "BepInEx" folder into your SPT folder

How to use this library (For mod developers):

  1. Download the latest release
  2. Copy the assemblies EXCEPT the UnityToolkit.dll from the release zip to where you store your project's assembly references
  3. Add all the assemblies as assembly references to your project
  4. Add [BepInDependency("com.Arys.UnityToolkit")] attribute to your plugin class
  5. You can now use UniTask and Unity.Collections in your mod

What features does this library provide?

  1. UniTask is a near zero-allocating, performant version of C# Tasks that's suited for Unity than the standard C# implementation.
    • It doesn't use threads or SynchronizationContext/ExecutionContext so the result is faster performance and lower allocation while matching Unity threading (single-thread).
    • It is also possible to replace Unity Coroutine usage, which has poor performance and higher memory allocation, with UniTask instead.
    • Documentation: https://github.com/Cysharp/UniTask
  2. Unity.Collections is included in this library for the additional NativeContainer types it provides such as NativeList, NativeHashMap, NativeMultiHashMap, and NativeQueue.

Is it safe?

Yes, both assemblies are just compiled versions of their original git repo I've also included a VirusTotal scan of both on the GitHub releases page

Version 1.2.0

5.7K Downloads

SPT 3.10.5 Virus Total Results
Created Feb 21st, 11:28 PM Updated Feb 21st, 11:28 PM

Added Dependency Injection Container and Event Bus structures for mod developers

Version 1.1.0

25.8K Downloads

SPT 3.10.5 Virus Total Results
Created Jan 11th, 12:37 AM Updated Jan 11th, 12:37 AM

New in this release

  • Fixed issue where UniTask's PlayerLoopSystem was not being injected correctly
  • Updated UniTask from v2.5.5 to v2.5.10
  • Added ZString v2.4.4 as a near zero-allocation string builder alternative
  • Added new structures: Closure<TContext>, ObjectPool<T>, and IProcessor<TProcessor, TData>
  • Added a new ModulePatchManager class which can be used in your client mod plugin to automatically enable your mod patches

See details in the release notes: https://github.com/Nympfonic/UnityToolkit/releases/tag/v1.1.0

Version 1.0.1

143.3K Downloads

SPT 3.10.5 Virus Total Results
Created Jul 8th, 2024 Updated Jul 8th, 2024

Updated UniTask from v2.5.4 to v2.5.5

Version 1.0.0

2.5K Downloads

SPT 3.10.5 Virus Total Results
Created May 20th, 2024 Updated May 20th, 2024

Initial release

Not quite yet...