Photon Unity Networking 2: PlayerNumberingExtensions Class Reference

Photon Unity Networking 2

PlayerNumberingExtensions Class Reference

Extension used for PlayerRoomIndexing and Player class. More...

Static Public Member Functions

static int GetPlayerNumber (this Player player)
 Extension for Player class to wrap up access to the player's custom property. Make sure you use the delegate 'OnPlayerNumberingChanged' to knoiw when you can query the PlayerNumber. Numbering can changes over time or not be yet assigned during the initial phase ( when player creates a room for example) More...
 
static void SetPlayerNumber (this Player player, int playerNumber)
 Sets the player number. It's not recommanded to manually interfere with the playerNumbering, but possible. More...
 

Detailed Description

Extension used for PlayerRoomIndexing and Player class.

Member Function Documentation

static int GetPlayerNumber ( this Player  player)
static

Extension for Player class to wrap up access to the player's custom property. Make sure you use the delegate 'OnPlayerNumberingChanged' to knoiw when you can query the PlayerNumber. Numbering can changes over time or not be yet assigned during the initial phase ( when player creates a room for example)

Returns
persistent index in room. -1 for no indexing
static void SetPlayerNumber ( this Player  player,
int  playerNumber 
)
static

Sets the player number. It's not recommanded to manually interfere with the playerNumbering, but possible.

Parameters
playerPlayer.
playerNumberPlayer number.
Online Documentation  -  Dashboard  -  Support Forum Exit Games GmbH