Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Preston Phillips · Mar 31 at 01:39 AM · apis

not triggering PARTY_STATE_CHANGE_TYPE_NETWORK_DESTROYED after PartyNetworkLeaveNetwork

Hi,
I am currently writing a custom network manager for unity using the 'PartyCSharpSDK' api but have ran into a problem with reconnecting to a network that I have previously left. (I am making a custom network manager rather then using the provided unity one as need multiple networks at the same time and have that working).


I have been told that I need to wait for the 'PARTY_STATE_CHANGE_TYPE.PARTY_STATE_CHANGE_TYPE_NETWORK_DESTROYED' before I can try and reconnect else the network remains in the active networks. However I am never getting the state change after calling 'PartyCSharpSDK.SDK.PartyNetworkLeaveNetwork()'. I do get the 'PARTY_STATE_CHANGE_TYPE.PARTY_STATE_CHANGE_TYPE_ENDPOINT_DESTROYED' and 'PARTY_STATE_CHANGE_TYPE.PARTY_STATE_CHANGE_TYPE_INVITATION_DESTROYED' events. Other users in the network also get that the users endpoint has been destroyed.


If I try to call 'PartyCSharpSDK.SDK.PartyConnectToNetwork()' on the network without caring about the destroyed event it fails with the error 4102 (something like already connected). I can get the destroyed networks old handle using 'PartyCSharpSDK.SDK.PartyGetNetworks()' and try to reconnect as if I had gotten the handle from 'PartyConnectToNetwork()' but it fails with an error about the network already being flagged for destruction.


Anyone know what I could be doing wrong to not get the 'PARTY_STATE_CHANGE_TYPE.PARTY_STATE_CHANGE_TYPE_NETWORK_DESTROYED' event or how I can fix not being able to reconnect to a network that I have already left?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Rick Chen · Mar 31 at 10:06 AM

Could you please provide a code snippet of your custom network manager?

Comment

People who like this

0 Show 5 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Preston Phillips · Apr 06 at 01:51 PM 0
Share

Sorry took so long to get this uploaded.
Here is the base class that takes care of party events and stuff.
I then have other classes call the PartyCSharpSDK.SDK as they need and register to the partymanager

partymanager.txt (24.5 kB)
avatar image Rick Chen Preston Phillips · Apr 08 at 10:34 AM 0
Share

I have checked the file you provided, but I cannot find where you have used the PartyCSharpSDK.SDK.PartyNetworkLeaveNetwork() or PartyCSharpSDK.SDK.PartyConnectToNetwork(). Could you please provide the code snippet where you have used those part?

avatar image Preston Phillips Rick Chen · Apr 08 at 11:00 AM 0
Share

network.txt

Here is the class that handles calling the PartyCSharpSDK.SDK calls

network.txt (78.4 kB)
avatar image Rick Chen Preston Phillips · Apr 09 at 10:03 AM 1
Share

Thanks for providing the information. I have been looking into your code but not found the issue yet. It could take some time for troubleshooting. I will let you know when I find something, your patience is appreciated.

avatar image Rick Chen Preston Phillips · 5 days ago 0
Share

I have checked the file you provided, it’s quite difficult to tell where the issue is. I notice that the way you handle PARTY_STATE_CHANGE_TYPE.PARTY_STATE_CHANGE_TYPE_ENDPOINT_DESTROYED is quite different than the one from PlayFabMultiplayerManager in Party SDK. And you have created a class OnlinePlayer instead of using the class PlayFabPlayer provided in Unity Party SDK. Apart from that I cannot find any other part that is suspicious. There are some dependencies in your code that I don’t have, it is hard to run your code on my machine.

The community is not a good place to ask for a demo of your customized SDK and the detailed reproducing steps, so I would suggest opening a support ticket and let the engineer investigate this issue further.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Is there a way outside of the Web Game Manager to Change Which Account a Device ID is linked to? 1 Answer

    iOS Restore Purchase Receipt using Unity IAP 1 Answer

    How can I add virtual currency to a user's account? 1 Answer

    Windows 10 UWP on PC and Xbox One 1 Answer

    In what ways can a Steam dedicated server access PlayFab APIs? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges