This guide demonstrates how to replace the town AssetBundle t01_all.ab with a simple cube. By following these steps, you can also replace the town or any other static model with your own.

Asset Bundle Tools

First, install the AssetBundle tools in the Package Manager (Window - Package Manager). We'll use it to build our own AssetBundles.

Custom AssetBundle setup

Create an empty GameObject and call it t01_all. It will be our root object, so its position, rotation and scale should be zero. Next, create a cube with the following transform values inside the empty object, which is the position where your house is normally located:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2b885156-d58a-4f6c-b36e-f14fe5f60f9f/Untitled.png

We also need to add a camera to see something. The game uses a package called Cinemachine, which you can install in the Package Manager. Add a new empty GameObject inside of t01_all and add a CinemachineVirtualCamera component. The game will automatically use this camera. Set the position and rotation to something that makes the cube visible, e.g.

The GameObject structure should look like this now:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bfa157fb-1f2e-45fa-a28e-35d1b0e85b64/Untitled.png

Drag t01_allinto the project window to create a prefab. Click the prefab and create a new AssetBundle called t01_allat the bottom of the inspector preview:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/27130b1a-0d5f-472a-a004-83c16f187a3d/Untitled.png

Open the AssetBundle browser (Window - AssetBundle Browser). The AssetBundle should now be listed in the Configure tab. Open the Build tab and click "Build". The default settings are fine.

Patching the platform

If you would replace the AssetBundle now, the game would crash since our Build Target was not set to Switch. This option only works if you have a Switch license for Unity, but we can manually patch the platform. You can use a hex editor or this script:

Note that there might be some assets (e.g. shaders) that won't work on Switch. It should work for almost all assets though.

Copying the AssetBundle

Now you can replace StreamingAssets/ab/t01_all.ab with your own AssetBundle. Depending on your setup, you might need to rebuild the ROM or copy the files to your SD card. The cube should show up in the game now. Note that the camera is stationary; we will fix this later:

Controlling the camera