Join Jesse Freeman for an in-depth discussion in this video Hide and show content, part of Building Custom Tools to Extend the Unity IDE.
- [Voiceover] So now that we're using the serialized…object to pull fields off of our HelloWorld script,…let's take a look at adding a few more.…We'll open up the HelloWorld editor…and start adding some other properties…into our props array.…Let's go ahead and add target and message as well.…Now if we save this and go back into Unity,…select our new sprite,…you'll see the new fields are now being displayed…in the HelloWorld editor.…Sometimes when you're building out an editor…like this, you may want to hide some of the fields…and let the user see them only when they need it.…
One of the ways we can do that…is with a fold out.…Let's go back into our code…and at the top of our class…let's add a new private boolean called visible.…We're going to use this to store the value…of whether we show or hide the fold out.…Now above where we set up our props array…let's add some space and set visible to equal,…editor gui layout.foldout…and inside of foldout we're going to pass…the visible value back in…and we're going to give it a label called options.…
- 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?
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.