A lightweight, source-distributed utilities library for both Unity and .NET Core projects. Includes optional support for MemoryPack serialization via conditional compilation.
See the full docs here:
👉 SaltboxGames.Core Documentation
- install Nuget For Unity
- install Command Line Parser
- install zlinq
- install SaltboxGames.Core
Add this to your project's Packages/manifest.json
.
git submodule add [email protected]:SaltboxGames/SaltboxGames.Core.git ./Packages/com.saltboxgames.core
- Unity will automatically recognize this as an embedded package.
- No
.asmdef
changes needed unless you want to add dependencies.
-
Add the library as a submodule:
git submodule add [email protected]:SaltboxGames/SaltboxGames.Core.git SaltboxGames.Core
-
Reference it in your consuming project's
.csproj
:<ProjectReference Include="SaltboxGames.Core/SaltboxGames.Core.csproj" />
SaltboxGames.Core can integrate with MemoryPack for fast, zero-allocation serialization. This support is opt-in via a build flag.
To enable MemoryPack, create a file named Directory.Build.props
at the root of your solution (alongside your .sln
file):
<Project>
<PropertyGroup>
<EnableMemoryPack>true</EnableMemoryPack>
</PropertyGroup>
</Project>
This will:
- Define
MEMORY_PACK
- Add the
MemoryPack
NuGet package automatically
- Install MemoryPack-Unity
- This will automatically define
MEMORY_PACK
Built with ❤️ by SaltboxGames. Pull requests, issues, and feedback welcome!