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.

Testing your multiplayer connection

Testing your multiplayer connection - Unity Tutorial

From the course: Unity: AR Visualization 03 Complex Interactivity

Start my 1-month free trial

Testing your multiplayer connection

Okay, we've done a lot of work so far. What we'd like to do now is check the results of our hard labor. We've got a couple of more things that we need to hook up. So, let's go to the Network Manager script. We've got two more events that we need to listen to. When we've successfully connected so, on connected, we've cached off our connection, we need to listen for a message and for a disconnected event. So before I actually add the events, I want to go and add the methods. So under connection error, let's go add a on message received. Private, void... on... message... received. And that's going to take two parameters, an object... the sender of the message... and a message object continuing the message. Fantastic. When we receive it, we're just going to trace out that message. Next, we're going to create the on disconnected event. Private... void... on disconnected... And that's going to take two…

Contents