Creating Material Palettes

First step; we want to create a folder in Unity under:

​Resources/Bundles/(YourMapName)/Material_Palettes

​you can name that folder whatever you want your Palette to be called eg. Houses_Random. Create a few Materials in the folder and set them up like this!
Now we want to attach some Textures to that. You should save these textures in your sources, and have them set up like here!

Next step is to give it a name and type. So call it your Map name and for the type put in content.

Open up your Unity Project Folder and create a folder called Builds then inside there a folder named Shared, and finally inside there you want a folder named Content.

​Make sure to grab Nelson's Content tool from the Sources folder!



After all of that go back into your project and open the content tool and press Build AssetBundles, this may take a few moments. After that you should be able to find a Mapname.Content file in the Content folder you created.

​Put this into the Unturned/Content folder!



​In your Map folder you can create a Bundles folder, and inside of that create a folder named Assets .
​To have this function correctly you will need to create a config.json in your map folder and include the line 

{
 "Load_From_Resources": false,
}



Now it is time to open Devkit!
​The windows you are going to want to have open are; Content Browser, Asset Browser, and Inspector!

In the Asset Browser, open up your the Assets folder you just created and right click on it, then select MaterialPaletteAsset rename it to whatever you like and select it











​In the Content Browser you should see your Mapname.Content in the list, open all the way to your Materials that you created!


Down in the Inspector press the + symbol until you have the same number of spots as you do materials then just grab and drag from the content browser to each slot


When you click on the empty box next to GUID, it will auto generate a GUID for you!

Make sure to save at this point!

​Go into one of your Object folders that you want to attach the material palette to and put this line of code into the .Dat file with the GUID you generated in your material palette.

​Material_Palette GUID#

​And thats it! Thanks for joining me in this tutorial, this is Mooki2much signing off!




​Stay Unturned!