-
Notifications
You must be signed in to change notification settings - Fork 1
Custom models (Unity)
This guide covers how to set up a Unity Project for modding models with a focus on custom costumes.
Important
Make sure that Unity is installed alongside the Engage Mod (Cobalt) template and make a new project with a name of your choosing.
Once your new project is created and you've opened it, sit tight and wait for the downloads to finish. This can take up to 5 minutes on first opening, so be patient!
Warning
This step might no be needed depending on what you are trying to achieve.
If you do not know if you need to do this, you do.
Before proceeding, you'll want to make sure to assign an addressable to FallbackError.shader.
Navigate to the Packages directory in your project and find FallbackError.shader in Universal RP > Shaders > Utils.

While selected, the Inspector (docked on the right) will display a greyed out Addressable textbox. Toggle the checkbox on, and set the field to Shaders/Utils/FallbackError.shader. After editing the field, click out of it to save your change.
In Engage, a costume is 3D model rigged to an Engage skeleton.
You need to use a 3D modeling program such as Blender to do this rigging. Doing this lets the game move the costume when characters are moving.
The game takes the costume model, and puts each character's head onto it and adjusts the body proportions.
As such, your model should have not just the clothes, but also any body parts like hands or feet that aren't covered by clothing.
If you are bringing a costume in from another game, you will need to re-rig it onto Engage's skeleton. If the skeleton structure is similar enough, you might be able to rename the bones to match Engage's. If they are too different, consider using a weight paint transfer.
You can find a reference rigged Blender project here: Pyra costume project.
You can find reference body models here: male female
Import your rigged FBX in your Unity project by dragging it in the Assets directory.
Note
If you plan to make a custom oBody (map model), set Avatar Definition to Create From This Model under the Rig tab.
When you're done, click the Apply button (if you don't see it, you may need to scroll down in the Inspector).
To test if your model is rigged correctly with the right object hierarchies, you can use an animation that is included in the template. (Currently, only a female test animation if provided.)
- Make sure your model is in the scene.
- In the Project window, open the
Assets/Share/Addressables/Unit/Anim/Combat/Swd0AF/Sw1/c000folder. - Drag the animation clip onto your model in the scene.
- Re-select your model in the scene.
- Open the Animation window.
- Play the animation by dragging around on the timeline.
If you can see an animation play, and it looks OK, you have rigged your costume correctly.
animation.example.mp4
You need to replicate the directory hierarchy of the game for the prefab of your choice. It is recommended to look at a similar bundle in a software such as AssetStudio or UABE(A) and observe the container path from it.
Example: for Corrin's amiibo outfit, Unit/Model/uBody/Cor0AF/c000/Prefabs/ is one such directory you can make.
Important
Note the capitalization here. It is not always important, but better safe than sorry!

Now, drag your FBX asset from the Assets directory to the Sample Scene at the center of the window, and make sure to give it the same name as the internal_path (or a made up one if you intend to add the file to the game). For our example, you'd pick uBody_Cor0AF_c000.
Warning
It is important that you respect the c_trans and meshGP hierarchy showcased here. All geometry must go under meshGP, while the bones are parented to c_trans.
Models can work if they are elsewhere, but it can cause issues, so pay attention to this.

Once done, drag the root GameObject of your bundle (uBody_Cor0AF_c000 here), and drop it in the directory you made previously.

Due to the game using the Addressables system (You may have noticed the Catalog.json/.bundle file in your dump), your bundle needs to be assigned an Addressable so the game is able to load it.
Select your freshly made bundle, and at the top of the Inspector you'll see a "Addressable" checkbox. Toggle it on, and then assign it an addressable fitting for its purpose.
Tip
If you don't see your file in-game, this is most likely one of the culprits.
Come back here and triple check first before investigating other possibilities.
An addressable is used to determine where to output a .bundle file in a project, so keep this logic in mind:
- Capitalization matters.
- Slashes (
/) in your addressable will be treated as a sub-directory. - The extension will ALWAYS be
.bundleeven if you leave your own.FallbackError.shaderwill output asfallbackerror.shader.bundle. - The addressable will output your filename in lowercase. That is normal and intended.
- The addressable is attached to
fe_assets_. This means the addressableShaders/Utils/FallbackError.shaderwould output your file infe_assets_shaders/utils/fallbackerror.shader.bundle

Select one of the meshes in your bundle so you can see its components in the Inspector. By default, the Standard shader is assigned, so we'll need to change that.
Look for the Shader you'd like to apply in your project (we'll use CharaStandard here) by clicking on the Shader dropdown of the material in the Inspector.
Navigate until your find CharaStandard and select it.
Assuming you did it right, you should see the following:

You can now display the properties of the Shader by clicking on the > symbol on the right of the dropdown, and assign textures and colors accordingly.

Finally, we need to "build" the project so that your files will be available to use in your mod.
Now that your bundle is ready to be created, visit the Divine Dragon button in the menu bar at the top of Unity, select the Divine Dragon Window entry and follow the instructions to assign an output path for your mod.
Tip
If you've already generated the bundle but need to redo this part, don't delete anything, simply visit Divine Dragon again but pick Build Addressables this time.

Once that is done, you'll find your .bundle files in the output path you picked.
This tool is still under development, and generally you will see that the build has succeeded. This does not mean all the files were patched successfully. Make a habit to check the Unity Editor Console for all the details.
Important
These bundles are being patched by bundle_tools behind the scenes to make them compatible with Switch games. You cannot simply build your project like you would for a PC game.
Assuming you followed every instruction properly, you should now have files that can be placed in a Cobalt mod for either replacement or file addition. If there are still issues, check the Troubleshooting Bundle Creation page.
The followings are examples of Unity projects that you can look at for comparison if you struggle with the previous steps.
- For models, check out the Pyra costume project, which was made following this guide!
- For weapons, check out the Raijinto mod
Lythos, the Engage modding Wiki • Resources • Getting Started • Cobalt Wiki * Discord Server