question

podorozhnyk-0 avatar image
podorozhnyk-0 asked

Unity, PlayFab/Mirror. One project or multiple

I'm new to Unity and would like to create multiplayer games. Choosing a network framework, my choice fell on Mirror. But in the process of studying, I had a question: Do I need to create projects for the client and server separately, or is one enough. The description of Mirror says that the server and client code can be placed in the same project. At the same time, in the github repository for the integration of playlab and mirror, the projects are divided into client and server. So, do I need to do two separate projects or is one enough?

unity3dmultiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

We recommend implementing two separate projects. Although the Mirror’s sample shows that the server and client can be implemented within a single project. But its logic still runs alone, which means that when the project operates as a server, the client's logic is useless, and vice versa. Doing so would make code redundant on both sides, and the inclusion of server code on the client side could create some security issues.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.