Member-only story
Unity tips: Editor Tools
Spend some time working on simple tools to help you when you need to debug your game.

I’ve been working with Unity3D for almost a decade and I know that editor tools are a handy and powerful.
I wouldn’t recommend them if you are prototyping, but If you are fully on with your next project, spend some time implementing editor windows or those nice editor buttons to test functionality.
Trust me, they save time, and sometimes they are faster than press play and create a messy test.cs script which has lots of a bad code.
But don’t get crazy, don’t start making tools everywhere because that’s not the point.
Here some examples:
In my new project, a 2D cute puzzle game with cats and… zombies (crazy ha!), we have the informants as long stripes with different sections.
Each level shows a different section. We could opt for just create different prefabs, but we decided to create a tool to select how long the environment is, and in which section starts.
Instead, we have 2 slices to select how many sections and the length.
We also have 2 buttons to create and destroy the backgrounds.

This little tool allows us to create the environment in the editor before waiting for the game to start and see the result.
Another example, We have a map with lots of cells for the selection of the level.
Each cell contains an ID and sprite and the neighbourhood cells that you can visit when you use the arrow keys. (For example, from level 3, you can visit levels 4 and 2).
When you press the spacebar, you enter the level, which is assigned to a cell in the map.
We keep a reference to each cell and its assigned level, so far we have 65 levels, and the MapManager contains all of them.
You can imagine how hard it is to assign every cell, every level name…
We created a simple editor button to assign all the cells and give them the corresponding level name (The name of the…