What I will show you today…

I have put together a simple example of a turn-based multiplayer game that uses a custom matchmaking system using Firebase Realtime Database with Unity!

Today we’ll completely crack it open and you’ll read about how the project and the database are structured and how the entire system works so you can easily integrate it and expand it for your own Apps!

Here’s a glimpse of the final result:


Photo by Lauren Edvalson on Unsplash

Before we begin…

  • Do you find learning easier if it comes from a video? If so, you can find the video lesson of this article right here! Sit back, grab your popcorns and start watching!
  • Alternatively, if you have just clicked on this article for the code, here it is! Go ham!

What we’ll be using

Here’s a recap of the external libraries we will use, in case you haven’t had the chance to read the previous article yet:

Okay, let’s do this!

To successfully sign in using an external provider, we’ll need to complete…


Photo by AbsolutVision on Unsplash

In May 2018, at the I/O developer conference, Firebase announced new Machine Learning APIs that are now available for free to developers.

They introduced Object Recognition, Face Detection, Barcode Scanning, Language Detection and much more; We might focus on these in future articles, but today we’ll check out Smart Reply.

What is Smart Reply?

Smart Reply is a Firebase ML Kit API which, given a conversation, will return 3 suggested replies to keep it going!


Photo by israel palacio on Unsplash

Before we begin…

If you haven’t already, I strongly recommend reading the story below before we start. It shows how to post and retrieve data from Firebase Database (which we will need in this tutorial).

Alright, let’s start!

These are the functionalities that I will show off today:

  • Ability to sign up and sign in with email and password;
  • Confirmation email on sign up;
  • Database protection with rules.

What we’ll be using

Here’s a recap of the external libraries we will use, in case you haven’t had the chance to read the previous article yet:


Photo by Jan Antonin Kolar on Unsplash

Why use REST?

When it comes to Unity, Firebase offers a complete SDK in order to easily integrate its different services (database, authentication, functions…).
So why should we use REST APIs instead?

The main reason is that the Firebase SDK is not available for Standalone Unity Builds (Windows, MacOS, Linux). There is a desktop workflow, but as it is stated on the Firebase documentation:

Caution: Firebase Unity SDK desktop support is a beta feature. This feature is intended only for workflows during the development of your game, not for publicly shipping code.

Moreover, I have encountered a bug that simply makes Firebase SDK…

Domenico Rotolo

I am Unity game-maker! Big fan of open source and games!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store