Join Jesse Freeman for an in-depth discussion in this video Add buttons to a custom editor, part of Building Custom Tools to Extend the Unity IDE.
- [Voiceover] Now let's go ahead and talk about…adding buttons to our custom editor.…Let's open up the HelloWorld editor in MonoDevelop.…Below our object field, let's go…ahead and create a new condition.…Inside of this condition we're going…to test for a click event on a button.…To do this, we'll need to use the GUI Layout class…and call the static method button.…Here we'll pass in a string for…what to display on the button.…Let's close the condition and talk about this for a second.…
As you can see from our earlier examples,…the GUI is incredibly functional.…As it goes through each line of code,…a particular action happens in line.…So in the case of speed we're immediately…setting the value of speed based on any…result that comes back from the slider input.…The same thing with target.…So when it comes to something like a button…we're simply going to test whether…the button returns true and that's how we know…that a button has been clicked on the GUI itself.…
Let's go ahead and create a debug log statement…and we'll display the script's message.…
- 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 Essential Training (2015)with Jesse Freeman3h 22m 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?
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.