08.01 Creating a basic map

Here you'll find out how to create a map.

Note: do this tutorial only after you completed 02. Making a basic prop.

Creating the scene

Create a new folder in the "___YOUR MODS GO HERE". This will be a folder containing ONLY YOUR SCENE! Do not put any other assets in here or it will not work. Then create another folder that contains your scene assets. You can name them for example: "test map scene" and "test map assets".

Then, go into the folder containing your scene, right click->Create->Scene. You'll need to name it as UUID. You can create one here: UUID Generator. Just rename the scene to the UUID that the generator gives you.

Editing the scene

Double click on the scene and delete the Main Camera and Directional Light from the hierarchy view on the left.

Then, right click on the hierarchy->3D Object->Plane. Change the scale of X and Z in the inspector to for example 25. Then, change the tag of it to Terrain and the layer of it to Terrain as well. Add a FireworkMesh component to it too. This will make sure you can teleport on the ground and that it'll have footsteps. Make sure to set its position to 0,0,0 as well. The player spawns at the coordinates 0,0,0 so it'll need to be there.

You can change the material type between Soft and Hard to make the footstep sound change between rock or grass. I'll set it to Hard since i'll make the ground texture rock. Make sure to save your scene by pressing CTRL + S. To see better, change the rendering mode to Unlit Draw Mode in the top right corner of the scene view.

Then, go into the test map assets folder and drag in some textures that you downloaded. I downloaded myself this rock texture: https://polyhaven.com/a/slate_driveway. If you want more, there's free ones on 3dassets. I downloaded only 1K textures since I don't need 4K and it takes way less size. Once they download, drag the diffuse (also called albedo) and normal map (usually called just nor) textures into the folder. Make sure you change the texture type of the normal map texture in the inspector to Normal Map.

Then right click->Create->Material. Into the Base Map, drag in the albedo texture and into the normal map drag in the normal map texture. Name the material for example Rocks.

Then drag the material onto the plane. You can see it appears way too big. To change that, change the tiling on the material. I changed it to 64x64 for me. Make sure to save the scene!

Adding Essential Map Middlewaware

In the scene, right click on the hierarchy->Create Empty. Add a new component to it called Essentials Map Middleware. There you can adjust all the settings of the map. For more info about it, refer to Essentials Map Middleware (Component).

Adding reflection probe

Create a new empty game object again and add the component Reflection Probe to it. Name it to Reflection Probe for example. Drag it into the Reflection probes variable of the essential map middleware.

Adding lights

Press right click in the hierarchy, right click->Light->Point light and adjust the position of it. You can adjust the intensity, color range etc in the inspector and you can drag it into the Lights to Turn Off At Day variable in Essentials Map Middleware. To see the light, change the rendering mode of the scene view back to lit.

Exporting it

Adding custom map scriptable object

Go into the "test map assets" folder, press right click->Create->Scriptable_Objects->CustomMap. Name it whatever you want. Give it whatever name and description you want. Write in the creator of course and drag in a thumbnail. Now, very important, copy the scene name and paste it into the UUID. Then set the version to for example 1.0.0. This should be it.

Exporting it

Press right click on the "test map scene" folder and select Create Mod Exporter. Drag in the "test map assets" in the Other Folders To Include variable. Then export the mod to the test folder and test it out in game. Then you can upload it to the steam workshop just as you would with any other mod.

This of course was a very simple map, but I think it's a good start. Maps aren't that easy to make so I don't expect too many of them to come out. If you need some help, you can check out this tutorial: How to Make Beautiful Terrain in Unity 2020 | Beginner Tutorial.

Last updated