From the course: Unity: AR Visualization 03 Complex Interactivity

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Starting a multiplayer connection

Starting a multiplayer connection - Unity Tutorial

From the course: Unity: AR Visualization 03 Complex Interactivity

Start my 1-month free trial

Starting a multiplayer connection

- [Narrator] Now, that we're all authenticated, let's actually connect to a room. If you're not already there, double-click on the Network Manager. In the Network Manager, we're going to do a couple of things. The first, is set some variables. Just like we had to store client, we're going to need to store the Connection, which is the final outcome of connecting. So, that'll be private Connection and we're going to call it connection. Great, I'm also going to make another getter/setter. I'm going to call this isConnected and I'm going to use that for our UI. IsConnected and here we're going to check if the state is connected or, which is the state one above that, HasWorldState. Excellent, so we have that. Let's move down a little bit. In SetState, we want to use our isConnected. Before we can talk to our UIManager, we need to add a reference to the ARApp.UI. We're going to go do that at the top using…

Contents