Network
Networking functions.
Fields
IsMasterClient
bool
true
Is current player the master client.
Players
List(Player)
true
List of all players in the room.
MasterClient
Player
true
The current master client.
MyPlayer
Player
true
My player.
NetworkTime
float
true
The current photon network time. This will probably be different from the Game time.
Ping
float
true
The current local player's ping.
Functions
SendMessage(target: Player, message: string)
null
Send a network message to the target player. This will be received in the OnNetworkMessage callback in Main.
SendMessageAll(message: string)
null
Send a network message to all players including yourself.
SendMessageOthers(message: string)
null
Send a network message to all players excluding yourself.
GetTimestampDifference(float t1, float t2)
float
Compute the wrapped timestamp difference from photon events. Used to determine delay.
KickPlayer(player : Player|int, reason="")
null
Kick the player via ID or Player object from the room, only callable by the host.
Last updated