From the course: Unity: AR Visualization 02 Basic Interactivity
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Scripting the menu system - Unity Tutorial
From the course: Unity: AR Visualization 02 Basic Interactivity
Scripting the menu system
- [Instructor] Now that we have our main menu all set up it's time to jump into some code. Let's open the UIManager in your code editor, excellent. So we need a couple of things here, one we need a way to identify our menus and they that we're going to do that is using an enum. Let's go and make public enum and call it Menus. Here we're going to setup an index for every menu that we want to launch. The first one's going to be MainMenu. Second one is going to be settings. And the last one's going to be parts. Perfect, so now we have a way to identify the menus we need to make a menu collection. This is going to be a collection of the game objects that represent the menus themselves. So here we're going to setup a public GameObject array. And it's public because we want it exposed in the editor. And we're going to call this menus. Great, now let's setup some methods to hide and show our menus accordingly. The first method…
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.
Contents
-
-
-
-
Making the UI manager4m 47s
-
(Locked)
Making a HUD menu button5m 17s
-
(Locked)
Setting up your first menu panel5m 18s
-
(Locked)
Designing the main menu panel4m 28s
-
(Locked)
Scripting the menu system5m 42s
-
(Locked)
Designing the settings menu4m 49s
-
(Locked)
Creating the settings script6m 54s
-
(Locked)
Driving the settings menu6m 30s
-
(Locked)
Wrapping up the toggle buttons4m 15s
-
(Locked)
AR app in action59s
-
-
-
-
-
-
-