question

Matt avatar image
Matt asked

Unity Server/Client using Mirror - Examples don't work.

Hi folks,

I'm trying to get a Multiplayer game server operational for my game. I've downloaded the mpsSamples from Github, and I'm trying to run the Unity Mirror example, but I can't even get the client to connect to the server locally.

I don't know if it's a problem with PlayFab, your example, Mirror, or what...

I forwarded the port (7777), I tried external and internal IPs, but when the client tries to connect to the server, it just times out.

Any help would be appreciated. The end goal, of course, is to connect to an MPS running on Azure, but first step is just connecting locally.

Thank you for the help! -Matt

unity3dCustom Game Servers
6 comments
10 |1200

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

Xiao Zha avatar image Xiao Zha commented ·

May I know which kind of server you are running? Linux or Windows? Container or Process? And how are you running your server locally? How are you setting up the Client project in Mirror Sample? And Could you please provide detailed error message? Also, you may refer to MpsSamples/UnityMirror/README.md at main · PlayFab/MpsSamples · GitHub to set up the Mirror sample and use LocalMultiplayerAgent to run the mirror server sample locally.

0 Likes 0 ·
Matt avatar image Matt Xiao Zha commented ·

Thank you for the reply. I'm running it on Windows, but I didn't integrate the LocalMultiplayerAgent. I wanted to use that UnityMirror sample you provided just to get a local connection going, then I was going to work on connecting to a remote server.

Without making any PlayFab calls (since I'm not using the LocalMultiplayerAgent), I simply wanted to connect first using that same, but the connection times out and never occurs.

This doesn't seem like a PlayFab error, since I'm basically just using Unity's Mirror to try to connect to my server, but I want to use your examples as I continue to work toward connecting to my remote custom server.

I will try to gather more information if I can, thank you for the help! -Matt

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Matt commented ·

Since the PlayFab Unity Mirror sample has already integrated with the PlayFab GSDK and the GSDK is used to connect your game server to the PlayFab agent installed on the VM, the LocalMultiplayerAgent is necessary to debug the server locally. You may refer to PlayFab/gsdk: Game Server SDK for PlayFab Multiplayer Servers (github.com) and Integrating the PlayFab GSDK into Unity - PlayFab | Microsoft Learn to have more information about GSDK. If you want to use Mirror without PlayFab Multiplayer Server service, you may seek professional help from Mirror support team.

0 Likes 0 ·
Show more comments

1 Answer

·
Matt avatar image
Matt answered

I completely misunderstood my issue with connectivity, and this question has no relevance at all to PlayFab. I apologize for the confusion!

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.