question

bprusha avatar image
bprusha asked

How to Connect to my Prefab server using unity mirror?

FIrst, thanks to any and all help. I really appreciate it. I am new to unity and playfab, so please forgive me. I know this is probably easy, but I am missing it. Here are the details:

1) I have a simple client making a command call using Mirror to the server. The server responds with an rpc call back to the client with a specific string. Basically a hello world program.

2) This works on my local machine

3) I have made the headless server build and posted it on my prefab title area. Its up an running with an AWS URL

Now, how to I get the client to contact the server? What replaces localhost for the network address? I tried the AWS URL but it won't connect.

Do I have to make a playfab connection in the client before doing the mirror command call to the server?

Or do I need to make a playfab call to get a list of available servers, then connect with their IP/port?

Thank you!

10 |1200

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

Seth Du avatar image
Seth Du answered

I am not sure what’s the format of your URL, as far as I know, there should be IP address and port for the connection. There also should be verification process when the client tries to connect the server.

I notice you are using AWS as multiplayer server, may I ask are you using external services or the legacy custom server of PlayFab? We can provide good technical support of Multiplayer Server 2.0 as it is considered as a preferred solution for multiplayer.

In addition, there is a study case provide by the community developer on thread: PlayFab / Mirror / Unity Multiplayer Hosting Document. Multiplayer Server 2.0 of PlayFab is used in this scenario.

Please also refer to this thread: https://community.playfab.com/questions/34579/unity-mirror-networking-with-playfab-matchmaking.html

10 |1200

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

bprusha avatar image
bprusha answered

Thank you for your quick response. I used the legacy because I didn't want to enter a credit card yet and I thought I could get it working that way first. I looked at these other docs before. I guess I'll try the multiplayer server method instead. Thanks again.

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.