CryptikLemur.AssetBundleBuilder
4.0.1
dotnet tool install --global CryptikLemur.AssetBundleBuilder --version 4.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local CryptikLemur.AssetBundleBuilder --version 4.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CryptikLemur.AssetBundleBuilder&version=4.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package CryptikLemur.AssetBundleBuilder --version 4.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AssetBundleBuilder
Command line tool for building Unity asset bundles for RimWorld mods. No repository cloning or Unity project setup required.
Quick Start
Recommended: Using Configuration File
Create a .assetbundler.toml
file in your project:
[global]
unity_version = "2022.3.35f1"
bundle_name = "author.modName"
asset_directory = "Assets/"
output_directory = "AssetBundles/"
link_method = "junction" # or "copy", "symlink", "hardlink"
# Note, if you are creating multiple assetbundles for a single mod, they need to have unique bundle_name's
[bundles.textures]
bundle_path = "author.modName"
bundle_name = "author.modName_textures"
filename = "resource_[bundle_name]_textures_[target]"
exclude_patterns = ["*.shader"]
targetless = true # No platform suffix - creates single bundle for all platforms
[bundles.shaders] # specify `--target windows` (or mac or linux) when running assetbundlebuilder to build for each platform
bundle_path = "author.modName"
bundle_name = "author.modName_shaders"
filename = "resource_[bundle_name]_shaders_[target]"
include_patterns = ["*.shader"]
targetless = false # Platform-specific - creates separate bundle per platform
Then build your bundles:
# Build a specific bundle, loads automatically from .assetbundler.toml
assetbundlebuilder --bundle-config textures
# Override settings from command line
assetbundlebuilder --bundle-config shaders --target windows
Installation
.NET Global Tool (Cross Platform)
# Install globally
dotnet tool install --global CryptikLemur.AssetBundleBuilder
# Use anywhere
assetbundlebuilder --config myproject.toml --bundle-config mybundle
Manual Installation
Download the appropriate executable for your platform from the Releases Page.
Configuration File Format
The TOML configuration file allows you to define multiple asset bundles with different settings:
Global Configuration
[global]
unity_version = "2022.3.35f1" # Unity version to use
unity_hub_path = "/path/to/Unity/UnityHub.exe" # Or specify exact path
unity_editor_path = "/path/to/Unity/Editor/2022.3.35f1/Unity.exe" # Or specify exact path
output_directory = "AssetBundles" # Default output directory
allowed_targets = ["windows", "linux"] # Restrict allowed targets
temp_project_path = "/tmp/unity" # Custom temp directory
clean_temp_project = false # Clean temp project after building. Disabled by default for caching
link_method = "copy" # How to link assets: copy/symlink/hardlink/junction
exclude_patterns = ["*.meta", "*.tmp"] # Files to exclude
include_patterns = ["*.png", "*.wav"] # Files to include
targetless = true # Default for bundles: no platform suffix
Bundle Configuration
[bundles.mybundle]
description = "My custom asset bundle"
asset_directory = "Assets/MyBundle"
bundle_name = "author.mybundle"
output_directory = "1.6/AssetBundles" # Override global output
allowed_targets = ["windows"] # Only allow specific targets
filename = "resource_[bundle_name]_[target]" # Custom filename format
targetless = false # Platform-specific bundle (default: true)
# Bundle-specific patterns
exclude_patterns = ["*.backup"]
include_patterns = ["textures/*", "sounds/*"]
Advanced Examples
Multiple Bundles with Different Targets
Note, if you are creating multiple assetbundles for a single mod, they need to have unique bundle_name's
[global]
unity_version = "2022.3.35f1"
link_method = "junction"
[bundles.core]
asset_directory = "Core/Assets"
bundle_name = "author.core_mod"
[bundles.windows_only]
asset_directory = "WindowsAssets"
bundle_name = "author.myMod_windows"
build_targets = ["windows"] # Only for Windows
[bundles.textures_hd]
asset_directory = "HD/Textures"
bundle_path = "author.myMod"
bundle_name = "author.myMod_textures_high"
exclude_patterns = ["*_low.png"] # Exclude low-res versions
[bundles.textures_low]
asset_directory = "SD/Textures"
bundle_path = "author.myMod"
bundle_name = "mymod.low_textures"
exclude_patterns = ["*_high.png"] # Exclude low-res versions
CI/CD Configuration
- name: Install AssetBundleBuilder
run: dotnet tool install --global CryptikLemur.AssetBundleBuilder
- name: Build Asset Bundles
run: assetbundlebuilder --ci
Features
Platform Support
- Build Targets:
windows
,mac
,linux
- Build Restrictions: Use
build_targets
array to limit which platforms a bundle can be built for
Asset Management
- Link Methods: Choose how assets are linked to Unity project
copy
: Copy files (safest, slower)symlink
: Symbolic links (fast, requires permissions)hardlink
: Hard links (fast, same volume only)junction
: Directory junctions (Windows, fast)
- Pattern Matching: Include/exclude files with glob patterns
- Custom Filenames: Use variables like
[bundle_name]
,[target]
,[date]
Unity Integration
- Auto-Installation: Automatically installs Unity Hub and Editor if missing (Windows/macOS)
- Version Discovery: Finds Unity installations by version number
- Temp Project Caching: Reuses temp projects for faster rebuilds
- Custom Unity Paths: Override with specific Unity executable path
CI/CD Features
- CI Mode: Disables auto-installation for CI environments
- Non-Interactive: No prompts for automation
- Verbosity Control: Quiet mode for cleaner logs
- Clean Builds: Option to force fresh builds
Command Line Reference
Run assetbundlebuilder --help
for full options list.
Troubleshooting
Unity Not Found
- Ensure Unity Hub is installed in standard location
- Or specify exact path in config:
unity_path = "C:/Unity/2022.3.35f1/Editor/Unity.exe"
Permission Errors
- Windows: Use
junction
link method instead ofsymlink
- Linux/macOS: Ensure proper permissions or use
copy
method
Build Target Issues
- Check
build_targets
array in your config doesn't exclude your target - Use
--target
CLI flag to specify build target
Project Stats
Support
- Issues: GitHub Issues
- RimWorld Modding: RimWorld Discord
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
4.0.1 | 60 | 9/7/2025 |
4.0.0 | 132 | 9/1/2025 |
3.0.0 | 178 | 8/28/2025 |
2.0.0 | 177 | 8/28/2025 |
1.6.0 | 126 | 8/19/2025 |
1.5.0 | 130 | 8/18/2025 |
1.4.0 | 150 | 8/17/2025 |
1.3.0 | 94 | 8/15/2025 |
1.2.0 | 135 | 8/13/2025 |
1.1.0 | 141 | 8/13/2025 |
1.0.3 | 153 | 8/12/2025 |
1.0.2 | 138 | 8/12/2025 |
1.0.1 | 143 | 8/12/2025 |
1.0.0 | 129 | 8/12/2025 |
Initial release with Unity version auto-discovery and cross-platform support.