What should I use to distinguish players?

I want to store players' data in the client who is running the "server" using dictionary(map), where player's data as values and identifiers as keys. In the comments in Player.cs it says that "ActorNumber" will change even on leave and re-join. So it seems not reliable to use "ActorNumber" as players' identifiers and keys to store data. So what are the recommended way to do so? Should I generate GUID for each players before joining the match? (so even when they re-join they can pass their GUID to the server client to get it's old data)

Comments

  • Hello @SPF,

    Yes, that is a good approach.
    Bolt does not have persistent user information for tracking, so you will need to build a solution for this.
    Keeping a local unique ID per player and using it to identify the player when it re-enters the session is one way to accomplish this.

    --
    Ramon Melo
    Photon Bolt Team
  • Thank you @ramonmelo . What is Player class used for? Is it lower layer in RealTime and not used in Bolt?
  • Hello @SPF ,
    Is it lower layer in RealTime and not used in Bolt?

    Yes, it's used internally, but not exposed as it needs to be managed by the internal loop.

    --
    Ramon Melo
    Photon Bolt Team