B.2 Registering via Unity Editor
Updated a month agoRegistering Content
Before DawnLib can recognize and load your content, you need to set up a structure for it.
The process is simple:
- In Unity, right-click in your Project window.
- Navigate to Create → DawnLib → Content Container.
- Click Content Container to create one.
ContentContainer
A ContentContainer is a ScriptableObject (a Unity asset used to store data) that defines which AssetBundles your mod will register.
An AssetBundle is a file that groups multiple assets together, such as models, textures, prefabs, audio clips, or even entire scenes. AssetBundles allow you to package and compress content so it can be loaded in-game.
Your ContentContainer should list and organize your content (e.g., items, enemies, mapObjects, etc) across different AssetBundles.
This setup enables having AssetBundles that function as self-contained modules that don't depend on other AssetBundles, and allows them to be turned off individually.
What This Means
This modular setup lets you divide your mod into parts without needing to upload multiple separate mods.
DawnLib automatically generates configuration files that allow players to enable or disable specific AssetBundles, letting them load only the content they want, similar to selecting a collection of small mods to download.
You can include as much content as you like in a single AssetBundle.
A single ContentContainer doesn’t need to represent only one thing; it can hold a mix of enemies, items, or anything else your mod adds.
Example setup:

Options Explained
| Option | Description |
|---|---|
| AssetBundleName | Select one of your existing AssetBundles. This bundle contains your ContentDefinition objects, which define what gets registered. |
| Config Name | Sets the config category name for the bundle. Example: If named AirControlUnit, the configs appear under ModName/AirControlUnit Options. |
| Generate NamespacedKeys | Useful if you’re using the DawnLib SourceGenerator for code-based mods. Not required, but it helps other developers write compatibility code. |
| Debug Vanilla NamespacedKey | Used internally by DawnLib developers to generate vanilla keys for debugging after updates. You can ignore this. |
ModInformation
A ModInformation ScriptableObject stores metadata about your mod. Such as the ModName, AuthorName, Version, and Mod Description.
If you register content through code, this asset is created automatically, so you don’t need to create it.
- In Unity, right-click in your Project window.
- Navigate to Create → DawnLib → Mod Information.
- Click Mod Information to create one.
Next Step
Once both ContentContainer and ModInformation assets are ready:
-
Add them to the same AssetBundle.
- The name doesn’t matter much, but it must end with
.duskmod(for example,coderebirthmainassets.duskmod). - The
.duskmodextension is what allows DawnLib to detect and automatically load your bundle.
- The name doesn’t matter much, but it must end with
-
Fill out the fields in your ModInformation, like so:

-
Important: DawnLib does not build AssetBundles for you — it only packages them for Thunderstore uploads.
To build AssetBundles, you must either:- Use the recommended builder:
https://github.com/XuuXiaolan/CR-AssetBundle-Builder.git - Or use Unity’s built-in AssetBundle builder.
- Use the recommended builder:
The paths you provide should point to where your AssetBundles are located so the tool can automatically package them into the correct folders.
Summary
- Create a ContentContainer and ModInformation.
- Add both to the same .duskmod AssetBundle.
- Configure the ModInformation fields.
- Build your AssetBundles manually or with the CR AssetBundle Builder.
- DawnLib will automatically detect and register your content during loading.
Pages
- A. Unity Setup
- B.1 Registering Content via Code
- B.2 Registering via Unity Editor
- C.1 Moons
- C.2 Interiors
- C.3 Weathers
- C.4 Enemies
- C.5 Inside/Outside Hazards
- C.6 Ship Upgrades/Decors
- C.7 Items
- C.8 Additional TileSets
- D.1 Achievements
- D.2 Vehicles
- D.3 Entity Replacements
- E.1 DawnLib SourceGenerator
- F.1 Utility Scripts
- F.2 Unity Editor Tricks