From the course: Advanced Unity: 3D Game Programming
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Combo boxes - Unity Tutorial
From the course: Advanced Unity: 3D Game Programming
Combo boxes
I this video i am going to show you how to create a typical comma box. A comma box is a common feature in many GUIs, but missing in the standard GUI controls provided by Unity. Comma boxes are sorted by selected on or many items from a list. The list can be a list of anything, and it can have multiple uses. For example it could contain strings which define which settings to use. Or it could contain game objects that would be your quest reward for the player. This means we will want to be able to associate an object with each object in the list to make it easier to use. We will also want to know when an item has been selected. Knowing when an item has been selected means we can respond for example by displaying more information about that choice, or previewing the selection in some way. Sounds like a job for events. Let's see what this might look like. Here we have a comment box that's going to implement the scriptable item class. We're not using mono behavior, because we're not going…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.