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.

Wrapping up the toggle buttons

Wrapping up the toggle buttons - Unity Tutorial

From the course: Unity: AR Visualization 02 Basic Interactivity

Start my 1-month free trial

Wrapping up the toggle buttons

- [Instructor] All right. Let's make these toggle events work. We'll start with the point clouds. Here I'm going to grab a reference for my point. Cloud visualizer. I'm going to set on enabled, is equal to the value that gets passed through. This value is basically whether the thing toggles on or off. Simple enough. I'm going to move down to the toggle debug. And I'm going to grab reference my debug manager. Going to use the game object here. Game object dot set active. I'm going to set this to the value. Lastly I'm going to work with the planes. Now the plane visualizer works a little bit differently from the point cloud visualizer. It creates multiple planes based on the planes that it finds and these are separate objects. So we have to go and grab a reference to all of those objects, set then enabled or disabled as well as stop or enable the plane manager to make more planes. All right so let's go get some…

Contents