Join Jesse Freeman for an in-depth discussion in this video Extend the base editor, part of Building Custom Tools to Extend the Unity IDE.
- [Voiceover] Now that we've covered some of the ways…that the built-in inspector works,…let's go ahead and create our own custom editor.…We'll need to open up the HelloWorld script.…At the top of the script, let's type out…using UnityEditor…and we'll import the UnityEditor namespace.…At the bottom of our script, let's create a new…custom class.…We'll make this a public class called HelloWorldEditor…and we'll have it extend the Editor class.…
Before this will work, we'll need to link this custom editor…with the HelloWorld class.…Let's do this with an attribute.…Here, we'll use the CustomEditor attribute,…and we're going to pass it a type of HelloWorld…as the class itself.…Now, whenever the inspector selects a game object…that has HelloWorld attached to it,…it will automatically display this editor.…Let's go ahead and override one of the built-in methods…for displaying the GUI.…
Here we'll type in override and look for the…OnInspectorGUI method.…By default, MonoBehaviour is automatically going to add…a call to Base.OnInspectorGUI.…
- Exposing variables to the Inspector
- Providing attributes to Inspector fields
- Extending the base editor
- Creating custom UI elements
- Modifying the layout of a custom editor
- Building a custom window
- Saving and loading data
- Creating a reorderable list
- Skinning custom inspectors
- Exporting assets as Unity packages
Skill Level Intermediate
Unity 5: 2D Generate Procedural Terrainwith Dan Violet Sagmiller4h 4m Intermediate
Game Design Careers with Brenda Romerowith Brenda Romero54m 41s Beginner
1. Introduction to the Inspector
2. Build Custom Editors in Unity
3. Create Custom UI Elements in Unity
4. Build a Custom Window in Unity
5. Saving and Loading Data in Unity
6. Advanced UI
7. Skinning Custom Inspectors
8. Export Custom Code
Code organization4m 35s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.