question

Tim van der Heijden avatar image
Tim van der Heijden asked

PlayFab Party GetRegions() only works after creating a network?

It is possible to get an array of regions containing region name & latency/ping. Using this, I can implement some form of QoS which I would like to execute before creating or joining an actual network. However, it seems the GetRegions() method is always returning an empty array until after I actually call CreateAndJoinNetwork().

The documentation mentions that the regions are not populated/updated until the first PartyRegionsChangedStateChange event is raised. This matches what I'm getting - event is raised only once, after calling CreateAndJoinNetwork().

However, the docs explicitly mention that "Background operations to populate this set begin when Initialize() is called", which seems to not be occurring.

Am I missing something, or is this a bug? Is there another way for me to explicitly trigger regions & latencies to be retrieved?

Docs: https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/reference/classes/partymanager/methods/partymanager_getregions

multiplayer
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.

Xiao Zha avatar image Xiao Zha commented ·

I will do some research.

1 Like 1 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

Thank you for reporting this issue. As the documentation PlayFab Party QoS measurements - PlayFab | Microsoft Learn says, the measurement should begin as soon as the Party is initialized, and if measuring QoS fails, the Party library will retry the measurement the next time player call PartyManager::CreateNewNetwork. We will investigate why it’s not working with Unity.

5 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.

Tim van der Heijden avatar image Tim van der Heijden commented ·

Hi, do you have any update on this? Without this I fear users will likely have a poor experience, because we can't differentiate between lobbies that are likely have a good connection vs. lobbies that have a (very) poor connection for the specific user.

The only other alternative would be to "create" a fake lobby and immediately leave it when opening our session browse view...

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Tim van der Heijden commented ·

We are still discussing the issue with our team. Thank you for your patience. Also, according to the PlayFab Party QoS measurements - PlayFab | Microsoft Learn, titles can call PartyManager::CreateNewNetwork with an empty list of preferred regions to allocate a network in the current lowest-latency region without waiting to inspect QoS measurement results.

0 Likes 0 ·
Tim van der Heijden avatar image Tim van der Heijden Xiao Zha commented ·

Hi, as mentioned this problem is blocking a feature in our game for players to join lobbies specific to their region. (and/or see an estimate of ping they will have based on the region) This will cause players to join "bad" lobbies where the latency will be too poor and they'll have to leave and join another random session.

The only workaround for this is for us to: 1. CREATE a "fake" lobby when the player opens the session browser. 2. Retreive pings to regions 3. Immediately leave the created "fake" lobby again.

This obviously will result in a lot of unneccessary operations & calls towards the PlayFab services, which is why we haven't done this pending this issue being resolved.

Unfortunately it appears this issue hasn't been given priority as it has been over a month since the last response, so I guess we'll have to live with it?

0 Likes 0 ·
Show more comments

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.