@@ -15,15 +15,19 @@ unity_version = "2022.3.35f1"
1515bundle_name = " author.modName"
1616asset_directory = " Assets/"
1717output_directory = " AssetBundles/"
18- build_targets = [" windows" , " linux" , " mac" ]
1918link_method = " junction" # or "copy", "symlink", "hardlink"
2019
20+ # Note, if you are creating multiple assetbundles for a single mod, they need to have unique bundle_name's
2121[bundles .textures ]
22+ bundle_path = " author.modName"
23+ bundle_name = " author.modName_textures"
2224filename = " resource_[bundle_name]_textures_[target]"
2325exclude_patterns = [" *.shader" ]
2426targetless = true # No platform suffix - creates single bundle for all platforms
2527
2628[bundles .shaders ] # specify `--target windows` (or mac or linux) when running assetbundlebuilder to build for each platform
29+ bundle_path = " author.modName"
30+ bundle_name = " author.modName_textures"
2731filename = " resource_[bundle_name]_shaders_[target]"
2832include_patterns = [" *.shader" ]
2933targetless = false # Platform-specific - creates separate bundle per platform
@@ -39,16 +43,6 @@ assetbundlebuilder --bundle-config textures
3943assetbundlebuilder --bundle-config shaders --target window
4044```
4145
42- ### Basic CLI Usage (Alternative)
43-
44- ``` bash
45- # Simple command line usage without config file
46- assetbundlebuilder 2022.3.35f1 " Assets/" " author.modName" " AssetBundles/"
47-
48- # With additional options
49- assetbundlebuilder 2022.3.35f1 " Assets/" " author.modName" " AssetBundles/" --target windows
50- ```
51-
5246## Installation
5347
5448### .NET Global Tool (Cross Platform)
@@ -74,17 +68,16 @@ The TOML configuration file allows you to define multiple asset bundles with dif
7468
7569``` toml
7670[global ]
77- unity_version = " 2022.3.35f1" # Unity version to use
78- unity_path = " /path/to/Unity.exe" # Or specify exact path
79- output_directory = " Output" # Default output directory
80- build_targets = [" windows" , " linux" ] # Restrict allowed targets
81- temp_project_path = " /tmp/unity" # Custom temp directory
82- clean_temp_project = false # Clean temp project after building. Disabled by default for caching
83- link_method = " copy" # How to link assets: copy/symlink/hardlink/junction
84- log_file = " unity.log" # Unity log output
71+ unity_version = " 2022.3.35f1" # Unity version to use
72+ unity_path = " /path/to/Unity.exe" # Or specify exact path
73+ output_directory = " AssetBundles" # Default output directory
74+ build_targets = [" windows" , " linux" ] # Restrict allowed targets
75+ temp_project_path = " /tmp/unity" # Custom temp directory
76+ clean_temp_project = false # Clean temp project after building. Disabled by default for caching
77+ link_method = " copy" # How to link assets: copy/symlink/hardlink/junction
8578exclude_patterns = [" *.meta" , " *.tmp" ] # Files to exclude
8679include_patterns = [" *.png" , " *.wav" ] # Files to include
87- targetless = true # Default for bundles: no platform suffix
80+ targetless = true # Default for bundles: no platform suffix
8881```
8982
9083### Bundle Configuration
@@ -94,10 +87,10 @@ targetless = true # Default for bundles: no platform suffi
9487description = " My custom asset bundle"
9588asset_directory = " Assets/MyBundle"
9689bundle_name = " author.mybundle"
97- output_directory = " CustomOutput " # Override global output
98- build_targets = [" windows" ] # Only allow specific targets
90+ output_directory = " 1.6/AssetBundles " # Override global output
91+ build_targets = [" windows" ] # Only allow specific targets
9992filename = " resource_[bundle_name]_[target]" # Custom filename format
100- targetless = false # Platform-specific bundle (default: true)
93+ targetless = false # Platform-specific bundle (default: true)
10194
10295# Bundle-specific patterns
10396exclude_patterns = [" *.backup" ]
@@ -108,24 +101,33 @@ include_patterns = ["textures/*", "sounds/*"]
108101
109102#### Multiple Bundles with Different Targets
110103
104+ > Note, if you are creating multiple assetbundles for a single mod, they need to have unique bundle_name's
105+
111106``` toml
112107[global ]
113108unity_version = " 2022.3.35f1"
114109link_method = " junction"
115110
116111[bundles .core ]
117112asset_directory = " Core/Assets"
118- bundle_name = " mymod.core "
113+ bundle_name = " author.core_mod "
119114
120115[bundles .windows_only ]
121116asset_directory = " WindowsAssets"
122- bundle_name = " mymod.windows "
117+ bundle_name = " author.myMod_windows "
123118build_targets = [" windows" ] # Only for Windows
124119
125120[bundles .textures_hd ]
126121asset_directory = " HD/Textures"
127- bundle_name = " mymod.hd"
122+ bundle_path = " author.myMod"
123+ bundle_name = " author.myMod_textures_high"
128124exclude_patterns = [" *_low.png" ] # Exclude low-res versions
125+
126+ [bundles .textures_low ]
127+ asset_directory = " SD/Textures"
128+ bundle_path = " author.myMod"
129+ bundle_name = " mymod.low_textures"
130+ exclude_patterns = [" *_high.png" ] # Exclude low-res versions
129131```
130132
131133#### CI/CD Configuration
@@ -135,16 +137,14 @@ exclude_patterns = ["*_low.png"] # Exclude low-res versions
135137 run : dotnet tool install --global CryptikLemur.AssetBundleBuilder
136138
137139- name : Build Asset Bundles
138- run : |
139- assetbundlebuilder --bundle-config textures --ci
140- assetbundlebuilder --bundle-config shaders --ci
140+ run : assetbundlebuilder --ci
141141` ` `
142142
143143## Features
144144
145145### Platform Support
146146
147- - **Build Targets**: ` windows`, `mac`, `linux`, or `none` for platform-agnostic bundles
147+ - **Build Targets**: ` windows`, `mac`, `linux`
148148- **Build Restrictions**: Use `build_targets` array to limit which platforms a bundle can be built for
149149
150150# ## Asset Management
@@ -173,22 +173,6 @@ exclude_patterns = ["*_low.png"] # Exclude low-res versions
173173
174174# # Command Line Reference
175175
176- While configuration files are recommended, all options are available via CLI :
177-
178- ` ` `
179- assetbundlebuilder [options] [unity-version] [asset-dir] [bundle-name] [output-dir]
180- ` ` `
181-
182- Common options :
183-
184- - `--config <file>` : Use configuration file
185- - `--bundle-config <name>` : Select bundle from config
186- - `--target <platform>` : Override build target
187- - `--ci` : Enable CI mode
188- - `--non-interactive` : Disable prompts
189- - `-v, --verbose` : Increase verbosity
190- - `-q, --quiet` : Decrease verbosity
191-
192176Run `assetbundlebuilder --help` for full options list.
193177
194178# # Troubleshooting
0 commit comments