question

Andrew Lower avatar image
Andrew Lower asked

PlayFab + Unity + Mirror - Some guidance would be awesome!

Hi there,

I'm missing key information and I'm just trying to get it straight in my head so I can crack on. I don't quite understand what I should be uploading to the PlayFab server. I've seen on other forum posts that a zip of the game.exe file as well as the game_data folder and whatever is is in the build folder. I get errors on the server because I'm automatically attempting to login with Steam, which of course, won't work on the server.

1 - Do I create two separate builds, one for the server and 1 for the client? If so, does the server build just include an empty server scene or something so it doesn't run my steam client login code?

2 - Does the Mirror NetworkManager component take the IP and port for my PlayFab server?

I probably need to ask several more questions but I'll leave it there for now.

Thanks again to anyone who can help me out here.

unity3dmultiplayerMatchmaking
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

·
Seth Du avatar image
Seth Du answered
  1. Yes, you will need to create separate builds. The purpose of server build and client build are different. The client should only contain Client API and will have the game logics including level definitions. However, server build will do data verification and update for connected players. You may need to implement HTTP listeners or sockets for the connections. Server APIs can be implemented there as the players can only exchange restricted data from HTTP, UDP or TCP.
  2. PlayFab team provide a Unity Mirror sample on GitHub, you may check it on gsdkSamples/UnityMirror at master PlayFab/gsdkSamples (github.com).
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.