- Home /
Where could I start with making a level editor where you can create your own terrain in Unity 2D?
I am currently working on a 2D side scroller project and have considered multiplayer for the game, so I figured being able to construct your own basic levels in a editor for the game would be cool. Any pointers for where to start?
I suggest taking a look at similar existing editors, it can be from any game or even a standalone application like Tiled. This will give you an idea about how to configure the user interface, where button sare placed and how they are grouped, and how the user interacts with the program (how the camera is moved, what mousebuttons do etc.).
Then, think about the functionality your editor should provide. What features are needed, what information needs to be presented, how can this be organized?
The next step is the actual implementation. I suggest using Unity's legay GUI system, because it can work runtime but it's also easily transferable to editor-only operation. Also, since you probably want to show dozens, if not hundreds of buttons, for things like placeable objects, textures, and so on, the new UI system would need the same amount of seperate GameObjects, one for each button.
For actual terrain generation, look into procedural mesh generation and how polyong colliders can be created and changed at runtime.
Your answer
![](https://koobas.hobune.stream/wayback/20220612095556im_/https://answers.unity.com/themes/thub/images/avi.jpg)