Unturned

Unturned

Not enough ratings
Workshop: Master Bundle
By Spebby
A guide that attemps to teach you how to use the Master Bundle tool.
   
Award
Favorite
Favorited
Unfavorite
What You'll Need
DISCLAIMER

Install a version of Unity 2019.4.x, to do this, download Unity Hub, and install a version through the client, the latest the better. Install with Mac & Linux support, without this support, Mac and Linux players wouldn't be able to play on your map without issues.

If you have any mods/assets that need updating your gonna have to bundle on this version. If you're on a Curated project, get all the assets into one Unity Project and bundle from there.
Make sure to import the "Project" and "Standard Assets" unity packages into your project. (Unturned>Extras>Sources>).

Awhile back a friend in a server I'm in was having issues with bundling, so I made a video guide for him. It's not the greatest production wise and I'd like to replace it with something smoother, but for now here's a rough video guide. Due to explaining Unity as a whole, if you are already familiar with the engine you can safely skip towards the start of the setup, there's a timestamp in the description for that.
Bundling
This part ain't hard, just takes a lot of time, here's what you do.

For simplicity's sake, we'll pretend we're making a Texas map. You can name your root directory in Unity whatever you want, but we'll be going with "TexasMasterBundle". Assuming you already have some assets made, you'll want to organise them into a hierarchy that matches the .dat structure in your mod's bundles directory. The structure has to be exact, otherwise the game can't link your assets to the .dats you've made for them. For example, if a tank top in the Map's files is located at Texas>Bundles>Items>Clothing>Shirt>Tank_Top then in unity it would be located in Assets>TexasMasterBundle>Items>Clothing>Shirt>Tank_Top. The Tank Top's folder should look something like this:
In Unity, you're going to need to make an "Asset Bundle" (You can do this by selecting any .prefab in Unity and going to the Inspector tab, at the Bottom right you should see a tab that reads "AssetBundle None" click on it, and click new in the popup, type in the name of the Master Bundle, something like Texas.masterbundle (you must add the .masterbundle suffix for it to work). Give your root folder (TexasMasterBundle) the AssetBundle tag. Now you're finally ready to export. Open up the MasterBundle tool and select the bundle you want to export(Located at Windows, Unturned, MasterBundle Tool). If you're just testing your mod, there's no need to select "Multi-Platform". You also need to have installed Mac & Linux support when installing the Unity editor for it to work.
Getting It To Work
Now, for the final and easiest part, you need to make a .dat file and put it into your Bundles folder. It needs to be called "MasterBundle.dat" the contents of the .dat should be as follows
Asset_Bundle_Name texas.masterbundle Asset_Prefix Assets/Texas
(The texas.masterbundle has to be lowercase)
Of course, replace the Texas part with your maps name/codename (peaks, cliffs, etc)
Your Bundles folder should look like this (of course there would prop be more folders)
Troubleshooting
In case you applied the Masterbundle Tag to all of you assets, a handy thing you can do is to go to the inspector tab and click "Filter Selected Name" this will show you all the assets with this tag.


If any part of this guide didn't make sense to you let me know and I will try to make it more clear.
Thanks for reading, and happy modding!
11 Comments
Curlyfries 29 Jun, 2023 @ 1:52pm 
@Spebby Thank you for this guide and your feedback it has been helpful (:
Curlyfries 29 Jun, 2023 @ 1:52pm 
@Spebby ohh my unturned put project.unitypackage and exampleassets.unityproject in unturned/extras/sources, not unturned/bundles/sources. why this game hates me so much i will never know.
Spebby  [author] 29 Jun, 2023 @ 1:18pm 
Hi there. I looked over the guide and did a minor rewrite. At some point I'd like to make a video guide and streamline the text guide. For now here's a really rough video guide I made awhile back for a friend. It's pretty rough and not to my standards quality wise, but this should answer any questions you have.
https://www.youtube.com/watch?v=m4Q_RTOiU1I
Curlyfries 29 Jun, 2023 @ 9:03am 
After creating the masterbundle and giving my assets the tag, i want to export, but there is no "masterbundle" tab, i only have the inspector, when i select any asset with the masterbundle tag. I'm probably misunderstanding the guide because it says "select the masterbundle," but there is no masterbundle its just a prefab and a folder with the assetbundle name (map).masterbundle. What do you want me to select?
纳卡希泽亲王 19 Dec, 2021 @ 5:13pm 
行吧。
Spebby  [author] 19 Dec, 2021 @ 2:04pm 
that would be called Datamining. I (had) a guide on how to do it, but it's outdated and I'd rather not update it.
纳卡希泽亲王 19 Dec, 2021 @ 2:00am 
.....how to unzip the assetbundle?I want to add france material but it was packed.
Spebby  [author] 9 Oct, 2021 @ 11:16pm 
...wouldn't reading the guide answer that for you?

No, Masterbundles are not just for maps, but they aren't that useful if you're only bundling one or two asserts, they're useful when you need to bundle a lot of things at once.
TheNLK 9 Oct, 2021 @ 10:38pm 
im trying to make a rocket launcher vehicle and im wondering how to export all of my folders. do i need to use a masterbundle for it to work (there is an item, magazine and vehicle). if so do i have to bundle it regularly in the individual folders and then start masterbundling?

i learnt all of this from scratch and have made basic mods before. this is the last step before exporting and another test in game.

previously i have failed multiple times. (also, ^^ are masterbundles only for maps?)
/im-a-noob/
Embersun 3 Nov, 2019 @ 12:43am 
Same problem with Jay Go. Was trying to update a mod but when I try to export it, it says "No AssetBundle has been set for this build.". I'm new with Unity and any help is welcome. Thanks for the guide :)