Unity 5: 2D Building a Tile Map Editor
1h 39mIntermediate2016-07-29
Authors

Jesse Freeman
Head of Partner and Framework Marketing at Amazon
Course details
Learn how to extend the Unity 5 IDE with custom tools like this tile map editor. Investing the time to customize Unity's environment today will make game development much more efficient tomorrow. This simple extension will allow you to easily design large 2D tile maps by simply painting them into your GameObjects. Over the course of the project, Jesse Freeman will show you how to build a tile map class, a custom tile picker, and a tile brush. He'll also show how to customize Unity menus to make your new tools easy to reach.
Learning objectives
Adding custom dropdown menus to Unity
Building a custom inspector
Creating a texture picker
Drawing the tile map grid
Creating a tile picker
Scaling a Texture2D
Creating a tile brush
Moving the tile brush
Erasing and clearing tiles
Learning objectives
Adding custom dropdown menus to Unity
Building a custom inspector
Creating a texture picker
Drawing the tile map grid
Creating a tile picker
Scaling a Texture2D
Creating a tile brush
Moving the tile brush
Erasing and clearing tiles
Skills covered
Real-Time ScriptingReal-TimeGame DevelopmentUnityVisualization and Real-TimeAECProduct and ManufacturingSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Welcome
- 02 - Exercise files
1. Extending Unity's IDE
- 03 - Setting up the project
- 04 - Adding a custom dropdown menu
- 05 - Creating a tile map GameObject
2. Building a Custom Inspector
- 06 - Building a custom inspector
- 07 - Adding editor property fields
- 08 - Capturing selected objects
3. Reading Sprites from a Texture
- 09 - Creating a texture picker
- 10 - Showing a warning message
- 11 - Calculating tile size
- 12 - Calculating the map size
- 13 - Dynamic pixels to units
4. Drawing the Tile Map Grid
- 14 - Creating the title map outline
- 15 - Drawing a tile grid
- 16 - Updating the grid size
5. Creating a Tile Picker
- 17 - Creating a custom window
- 18 - Displaying a Texture2D in a window
- 19 - Scaling the Texture2D
- 20 - Adding scrolling to the window
- 21 - Highlighting the selected tile
- 22 - Styling the title picker highlight
- 23 - Moving the highlight
- 24 - Saving the title selection
6. Creating a Tile Brush
- 25 - Create the tile brush
- 26 - Instantiating the tile brush in the scene
- 27 - Customizing the tile brush
- 28 - Updating the brush's Sprite preview
7. Moving the Brush
- 29 - Getting the mouse position
- 30 - Moving the tile brush
- 31 - Keeping the brush in the tile map's bounds
8. Finishing Up the Tile Map
- 32 - Creating a group for tile instances
- 33 - Adding drawing to the tile map
- 34 - Erasing tiles
- 35 - Clearing all of the tiles
- 36 - Cleaning up the tile map
9. Cleaning Up the Tile Picker
- 37 - Optimizing a Texture2D
- 38 - Tile picker with padding
Conclusion
- 39 - Next steps