O'Reilly logo

Mastering Oculus Rift Development by Jack Donovan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Unity's matchmaker system

Unity's network manager contains several functions used for interacting with a matchmaking system that allows hosts to list their games on the Internet and potential players to find them. This is what will let players join and play games with others without needing to know the host's IP address.

We'll build out a JoinCanvas menu in this section, allowing you to search for games instead of just creating them, but first we need to modify our hosting functions to post data to the matchmaking server.

Creating a matchmaker game

To use the matchmaker, we'll have to explicitly initialize it in code first. Add two using statements to the top of your NetworkGameManager script to include the Match and Types namespaces:

unity ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required