Complete Guide for Custom Inspectors & Windows in Unity!

Looking for ways to make your script a lot more designer-friendly? This is your definitive guide!
5.0 (5 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
56 students enrolled
$20
Take This Course
  • Lectures 31
  • Contents Video: 4.5 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 5/2016 English

Course Description

Exposing properties to the editor is useful, but it can't be used to create complex things.

By creating custom inspectors and editors, you'll have full control over how Unity looks and exposes itself to Game Designers and people who are there to balance the game and play around with your scripts. Your job is to make their job easier, and this can be a good start point!

This course expects some proficiency in programming, so you should be comfortable with C# for Unity before you get started.

This unique content will get you through the whole process of creating nice looking custom inspectors for your scripts, windows and custom properties, but it will also cover quick ways to change the appearance of a script's inspector by using variable and method attributes.

What are the requirements?

  • Download, install and apply for a Unity 5 license
  • Have some C# knowledge and how it works in Unity
  • Have a good understanding of Object Oriented Programming (OOP)

What am I going to get from this course?

  • Build your own customized inspectors from scratch
  • Build windows inside Unity that communicate with your scripts by either getting or setting data
  • Develop ways to make your code appear readable by designers so they have control over balancing the game

What is the target audience?

  • Editing your code is always painful? Then this course is for you, because you'll learn ways to increase productivity by developing beautiful customized inspectors to facilitate this task
  • Those game designers always want you to balance the game? Well, this is their task, so give them a good reason to to that by creating readable inspectors and windows to control the entire game
  • Have no experience in Unity whatsoever? This course may not be what you're looking for, as you first should get comfortable with C#

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Getting Started
Introduction video
Preview
01:53
Section 2: Fast ways to improve your script's inspector readability
02:50

Let's learn what attributes are before we actually jump in the action!

05:56

Learn about the Range attribute and how you can improve your code's inspector with it.

01:47

Multiline makes the string field even better!

05:37

These attributes are made to make your inspector shine by calling the designer's attention to specific areas.

03:36

Context menus have been a part of Unity since forever now, but there's not many people that actually know about it nor how to use it. You got lucky!

Attributes Quiz
3 questions
Section 3: Customizing The Inspector Of A Script
How is a custom inspector organized + Understanding what we'll build
Preview
04:24
04:44

Let's start off by coding a script on top of which we'll be working.

15:51

This lecture goes through the process of defining a custom inspector for the script we've just created and explains a few key aspects on custom inspector creation.

17:45

This lecture will take you through the process of adding elements to the inspector and also how to modify your element's Transform via the inspector itself.

17:07

The simulate tab is a quick way to preview the interpolation you've just made. Also, you'll learn how to add colors to the inspector to call the attention to desired areas.

19:20

Custom inspectors are not constrained to the inspector tab. From this point on, you'll start learning how to add 3D elements to the scene tab!

10:53

More on how you can add elements to the scene view. This time, how to add handlers (Those things that control the Transform of your Game Object in the scene).

18:29

The scene view can also be used to draw 2D elements like button or whatever else you want! Learn how in this lecture.

03:11

The act of building a game should be the smoothest process during the creation, but sometimes errors may occur. In this lecture you'll learn how to avoid errors due to the namespace UnityEditor.

11:04

This lecture goes back to the scripting part and doesn't directly deal with the inspector itself. You'll learn how to create a coroutine that takes your Game Object through the path you've created.

Inspector's GUI Quiz
3 questions
Section 4: Creating Windows and Menu Items
02:01

Before we get in depth on custom Editor Windows, let's learn how they work1

10:22

Let's start by creating the Item base class, which we'll be editing in the editor later on!

04:27

Our list of Items must be managed by a, well... Manager class. This is what we're doing in this lecture.

10:22

Here's another fun bit! In this lecture you'll learn how to proceed when creating a custom Editor. 

13:47

Starting our Editor customization, we'll build a toolbar to choose between two ways of editing our list of Items.

09:07

In this lecture you'll learn how to access the manager class from an EditorWindow.

18:17

Now we're going to draw the Create tab and make the user able to add new Items to the database.

12:10

In this lecture we'll check for taken IDs before we add a new item to the database plus we'll solve the non-serializable problem that affects user-created classes. This basically corrects the problem of the instances of the class not being saved by Unity so whenever you press Play or quit the program, your information is no longer there.

10:55

Re-usability of code makes it way easier to draw the Edit tab. We will use the same function we've used in the last lecture to draw all the elements we have so far.

03:12

After drawing all the elements we've noticed that we need a Scrollbar to let us view them all. Let's do this!

Editor Windows Quiz
1 question
Section 5: Writing Custom Attributes (Changing bool Default Look To A Toggle Button)
02:13

In this introductory video, you'll learn about how do custom attributes (property drawers) work.

04:37

Some more information on what a Property Drawer is, since you may have forgotten.

05:24

Let's define our own PropertyDrawer class in this lecture. Here's everything you need to know when designing yours.

08:58

I don't particularly like the way a bool displays. I'd rather have a button that turns green or red depending on its current state. Well, why won't we do this? 

09:25

Remember how the Range attribute receives a couple of parameters? In this lecture we'll go through the process of doing this for our own PropertyDrawer!

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

José Augusto Thomas, Professional Game Developer

English

I'm professional game developer with years of experience in the industry and passionate about learning and teaching.

I've already taught 10000+ students throughout the platforms I worked at! My teaching methods are simple, though highly effective.

In 2015, I developed the main gameplay systems for the first Angry Birds Virtual Reality Experience ever produced for Rock in Rio Las Vegas. Imgnation Studios (where I work at) partnered with Rovio to develop this title. A couple of months later, I had great contribution on the development of Angry Birds Space, a game made in partnership with Rovio and NASA to celebrate New Horizons pass-by Pluto.

Português

Sou um profissional da área de desenvolvimento de jogos com anos de experiência na industria e apaixonado por aprender e ensinar.

Incluindo todas as plataformas nas quais tenho conteúdo publicado, somo mais de 10 mil estudantes! Meus métodos de ensino são simples mas muito efetivos.

Em 2015, trabalhei nos principais sistemas de Gameplay para a primeira experiência dos Angry Birds em Realidade Virtual, produzido para o Rock in Rio Las Vegas. A Imgnation Studios (empresa onde trabalho) fez uma parceria com a Rovio (desenvolvedora original dos Angry Birds) para o desenvolvimento desse projeto. Alguns meses depois, contribuí amplamente no desenvolvimento de Angry Birds Space, um jogo feito em parceria com Rovio e NASA para comemorar a passagem da New Horizons por Plutão.

Ready to start learning?
Take This Course