Nakama x Unity Mirror

Hey Guys,

I have been looking back into multiplayer after a 2 year or so break due to work and also taking up Unreal development. I have been taking some time in order to try to learn more about Nakama.

I am developing my first game with the tool and I am wondering how possible it is to use Nakama for my backend platform, whilst using something like Mirror for my frontend. I have spotted one or two topics mentioning Mirror here, so I am guessing that it may be possible.

It is a very simple game that I am looking to create, so as that I can ease myself back into Mirror and learn more about Nakama.

What I am thinking is to use Nakama for the likes of my login/registration and leaderboards, (maybe as the server that players will connect to but this is far from essential as I know mirror can handle this part on it’s own) and somehow connect these accounts in with Mirror to handle the rest of the multiplayer.

My main questions are:

  1. Is any of this possible or do I have to use one or the other only?
  2. Is it possible to connect my Nakama accounts to Mirror?
  3. What is the best way to go about connecting everything? - Is there any tutorials out there or material I may be able to check out as an example?

Any help at all would be absolutely fantastic and so highly appreciated! Thanks for taking the time to read :slight_smile:

Edit 1&2: Deleted and undeleted the post as I pressed the wrong button lol
Edit3: If this has been previously asked, please just link me the other topic and I would be delighted to check that out thank you!

Hey @cobby363 it is definitely possible to use Nakama for REST APIs and Mirror for realtime networking if you want networked GameObjects or lower level control of the transports. We don’t have any in-depth technical guides on integrating the two. Although Mirror does offer some nice looking transports and synchronized variables, I would honestly start with Nakama’s realtime capability and see if that gets you where you need. We’ve yet to encounter a studio that hasn’t been able to achieve what they want with our realtime functionality.

I suggest starting with Nakama for a couple reasons:

  • As you pointed out, managing accounts between multiple providers could be a huge drain on your time.

  • I don’t know of any dedicated server support for Mirror so you would be forced into a client-authoritative model unless you spent a lot of time managing your own infrastructure.

Hi @lugehorsam, thank you so much for your answer! Knowing that it is possible really is what I needed so as that I know I’m not waltzing down a dead end. I’d like to learn to integrate them both so as that I have some value with both tool and learning to integrate them amongst one another.

I have the accounts set up already with Nakama so I guess now it is more of a Mirror question from here. I’ll do my best to integrate them and go from there.

Thanks so much for your help!