Urgent - Player Custom Properties Not Clearing

Options

Hi, there is an issue of pretty high urgency. In my game matches the players Local Properties are not getting reset when they join a new match. This is causing them to retain the score from their previous match. At the start of each match I have the Local Player Properties reset to their default values (0). I have tried resetting stats instead at the end of the round but the issue still persists. Any ideas?

Answers

  • This was not happening as of yesterday. I truly have no idea what it could be because I reset the custom properties at start and end of match

  • Tobias
    Options

    I thin in this case, it is acceptable to call LocalPlayer.CustomProperties.Clear(); in the "left room" callback. This will clean the Custom Properties of the local player locally.

  • Hi Tobias,

    Thank you very much for your response. It turns out that this problem occurred because I was setting the custom properties two times in the same frame, so for some reason it would only store the latter state. I created a custom method to clear the Custom Properties at the end of each match as a workaround to this problem. I am currently in the process of learning fusion, and am really excited about what it has to offer. From what I've learned so far, I feel like my capabilities for what I can do are going to multiply ten fold. Your responses in these forums have been a cornerstone in my Photon Pun journey, and have given some really valuable insights into the API and library. See you on the other side with Fusion.

    -GJ710

  • Tobias
    Options

    Glad I could help you!

    Yes, I think so too: Fusion is able to unlock a lot of potential. Have fun with it! Cya there :)