question

jonas.barnaby@gmail.com avatar image
jonas.barnaby@gmail.com asked

Get the region of an active game

Hi,

I was wondering if there's a way for a game server to know its own region. I know it's possible to retrieve all the possible regions where a given build can instantiate game servers, but I would like to know if there's a way (an API call or something) for a game server to know its region. Please note we need to know that while the game server is still running and not for a finished session.

To further clarify the issue, this is the parameter we need: http://i.imgur.com/PoZlnd3.jpg

Thanks in advance,

Alberto

Custom Game Servers
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

·
brendan avatar image
brendan answered

Yes, one of the default command line parameters passed into any hosted server is server_host_region. That's specifically a string containing that information. You can read more about the command line parameters in the custom game server tutorial, here: https://api.playfab.com/docs/custom-game-servers.

1 comment
10 |1200

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

jonas.barnaby@gmail.com avatar image jonas.barnaby@gmail.com commented ·

Oh, I see. Yes, that's the parameter we need.

Thanks for the answer!

0 Likes 0 ·

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.