Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Extending Unity with Editor Scripting
  • Toc
  • feedback
Extending Unity with Editor Scripting

Extending Unity with Editor Scripting

By : Angelo R Tadres Bustamante
4.7 (7)
close
Extending Unity with Editor Scripting

Extending Unity with Editor Scripting

4.7 (7)
By: Angelo R Tadres Bustamante

Overview of this book

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 (12 chapters)
close
11
Index

Overview

Probably, at this point, you are familiar with the basic concepts of Unity and we can safely assume that you know how to create a small video game from scratch without too many complications. You know, for projects of this size, almost everything is always under control and nothing takes too much time to be done. Basically, it is like a little paradise in the video game developer's land.

However, when the project starts increasing in size in terms of complexity, you will notice that certain tasks are repetitive or subject to error, generating a considerable amount of effort and waste of time. For example, the mechanics of your video game are quite unique and it is hard for the level designers to create content on time and without errors. This is because Unity, or the available third-party tool you use, doesn't satisfy all the required functionalities.

Sometimes, because you have more people working on the project, the lack of a mechanism to encourage people to follow standards makes your video game crash constantly.

In the same scenario, imagine that your project also requires a lot of art assets, so artists constantly add these to Unity. The problem appears later when one of the developers needs to constantly check whether the settings of these assets are configured properly to make these look right in the final build, consuming development time.

Finally, your project will be available on several platforms. However, owing to the specific characteristics of your video game, every time you make a production build, you must check whether all the settings are okay. You also need to check whether you removed all the cheat menus used by your testers and that the correct assets are loaded into each because you are preparing a trial version. Managing this becomes a huge task!

To solve all these issues, Unity provides an editor scripting API. Using this we can do the following tasks:

  • Modify how the Unity editor behaves, triggering our code with specific events
  • Improve the workflow assistance with a custom GUI that seamlessly integrates with the Unity editor GUI
  • Automate repetitive tasks by accessing the Unity editor's main functionalities

Understating how to use the editor scripting API to create editor scripts in your project will allow you to make Unity work for your video game and boost the productivity of the video game development.

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete