Extending Unity with Editor Scripting

Put Unity to use for your video games by creating your own custom tools with editor scripting

Extending Unity with Editor Scripting

This ebook is included in a Mapt subscription
Angelo Tadres

1 customer reviews
Put Unity to use for your video games by creating your own custom tools with editor scripting
$0.00
$30.60
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785281853
Paperback268 pages

Book Description

One of Unity's most powerful features is the extensible editor it has. With editor scripting, it is possible to extend or create functionalities to make video game development easier. For a Unity developer, this is an important topic to know and understand because adapting Unity editor scripting to video games saves a great deal of time and resources.

This book is designed to cover all the basic concepts of Unity editor scripting using a functional platformer video game that requires workflow improvement.

You will commence with the basics of editor scripting, exploring its implementation with the help of an example project, a level editor, before moving on to the usage of visual cues for debugging with Gizmos in the scene view. Next, you will learn how to create custom inspectors and editor windows and implement custom GUI. Furthermore, you will discover how to change the look and feel of the editor using editor GUIStyles and editor GUISkins. You will then explore the usage of editor scripting in order to improve the development pipeline of a video game in Unity by designing ad hoc editor tools, customizing the way the editor imports assets, and getting control over the build creation process. Step by step, you will use and learn all the key concepts while creating and developing a pipeline for a simple platform video game. As a bonus, the final chapter will help you to understand how to share content in the Asset Store that shows the creation of custom tools as a possible new business. By the end of the book, you will easily be able to extend all the concepts to other projects.

Table of Contents

Chapter 1: Getting Started with Editor Scripting
Overview
Editor scripting basics
Introducing Run & Jump
The Level Creator tool
Summary
Chapter 2: Using Gizmos in the Scene View
Overview
Creating gizmos through code
Adding a structure to our levels
Implementing the gizmo grid
Implementing the snap to grid behaviour
Summary
Chapter 3: Creating Custom Inspectors
Overview
Upgrading the Level class
Understanding how an inspector works
Creating a custom inspector
Working with layouts
Improving the inspector without custom inspectors
Using drawers inside a custom inspector
Summary
Chapter 4: Creating Editor Windows
Overview
Creating the base for an editor window
Implementing the Palette
Implementing the GUI for the Palette
Integrating the Palette with the Level Creator tool
Summary
Chapter 5: Customizing the Scene View
Overview
Defining the Editor modes
Customizing the Scene View
Detecting Scene View events
Implementing the Level Creator modes
Using the Handles class
Adding the final details to Level Creator
Summary
Chapter 6: Changing the Look and Feel of the Editor with GUI Styles and GUI Skins
Overview
Changing the look and feel of the Level Creator tool
Changing the look and feel using a simpler approach
Summary
Chapter 7: Saving Data in a Persistent Way with Scriptable Objects
Overview
Preparing the environment
Implementing a Scriptable Object
Integrating the Scriptable Object with the level
Summary
Chapter 8: Controlling the Import Pipeline Using AssetPostprocessor Scripts
Overview
Improving the import pipeline
Using a DLL file for the AssetPostprocessors
Summary
Chapter 9: Improving the Build Pipeline
Overview
Automating the BuildPipeline class
Adding version control to your project
Interacting with external scripts
Distributing your video game using AppBlade
Summary
Chapter 10: Distributing Your Tools
Overview
Preparing the environment
Sharing code using a Unity Package
Sharing code using Git submodules
Publishing in the Asset Store
Summary

What You Will Learn

  • Use Gizmos to create visual aids for debugging
  • Extend the editor capabilities using custom inspectors, property and decorator drawers, editor windows, and handles
  • Save your video game data in a persistent way using scriptable objects
  • Improve the look and feel of your custom tools using GUIStyles and GUISkins
  • Configure and control the asset import pipeline
  • Improve the build creation pipeline
  • Distribute the custom tools in your team or publish them in the Asset Store

Authors

Table of Contents

Chapter 1: Getting Started with Editor Scripting
Overview
Editor scripting basics
Introducing Run & Jump
The Level Creator tool
Summary
Chapter 2: Using Gizmos in the Scene View
Overview
Creating gizmos through code
Adding a structure to our levels
Implementing the gizmo grid
Implementing the snap to grid behaviour
Summary
Chapter 3: Creating Custom Inspectors
Overview
Upgrading the Level class
Understanding how an inspector works
Creating a custom inspector
Working with layouts
Improving the inspector without custom inspectors
Using drawers inside a custom inspector
Summary
Chapter 4: Creating Editor Windows
Overview
Creating the base for an editor window
Implementing the Palette
Implementing the GUI for the Palette
Integrating the Palette with the Level Creator tool
Summary
Chapter 5: Customizing the Scene View
Overview
Defining the Editor modes
Customizing the Scene View
Detecting Scene View events
Implementing the Level Creator modes
Using the Handles class
Adding the final details to Level Creator
Summary
Chapter 6: Changing the Look and Feel of the Editor with GUI Styles and GUI Skins
Overview
Changing the look and feel of the Level Creator tool
Changing the look and feel using a simpler approach
Summary
Chapter 7: Saving Data in a Persistent Way with Scriptable Objects
Overview
Preparing the environment
Implementing a Scriptable Object
Integrating the Scriptable Object with the level
Summary
Chapter 8: Controlling the Import Pipeline Using AssetPostprocessor Scripts
Overview
Improving the import pipeline
Using a DLL file for the AssetPostprocessors
Summary
Chapter 9: Improving the Build Pipeline
Overview
Automating the BuildPipeline class
Adding version control to your project
Interacting with external scripts
Distributing your video game using AppBlade
Summary
Chapter 10: Distributing Your Tools
Overview
Preparing the environment
Sharing code using a Unity Package
Sharing code using Git submodules
Publishing in the Asset Store
Summary

Book Details

ISBN 139781785281853
Paperback268 pages
Read More
From 1 reviews

Read More Reviews