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.

Testing your move UI

Testing your move UI - Unity Tutorial

From the course: Unity: AR Visualization 02 Basic Interactivity

Start my 1-month free trial

Testing your move UI

- [Instructor] Right, we've done a bunch of work on states, and we're getting ready to test our UI. But before we get there, let's do some cleanup on our AR Manager. Click on the AR Manager, double-click on the script. All right, so we've got these states here, but we want to set a cleaner way of setting these states. So let's go down and create a new method and then put this under Update, under the Unity messages, and we're going to say public void SetState. There's going to be a little handler that goes ahead and sets the state and changes some things, depending on what the state is. All right, so we want to take in a state type, and obviously, we want to set the state. So our state is going to be equal to pState. We also want to update the UI state. So down here, we're going to go UIManager.instance.SetState. We're going to pass in the new state that we changed to. So here, when we set the state, we're updating the…

Contents