Photon .NET Client API 4.1.4.8

Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
Photon.Realtime.RoomInfo Class Reference

A simplified room with just the info required to list and join, used for the room listing in the lobby. The properties are not settable (IsOpen, MaxPlayers, etc). More...

Inheritance diagram for Photon.Realtime.RoomInfo:
Photon.Realtime.Room

Public Member Functions

override bool Equals (object other)
 Makes RoomInfo comparable (by name). More...
 
override int GetHashCode ()
 Accompanies Equals, using the name's HashCode as return. More...
 
override string ToString ()
 Returns most interesting room values as string. More...
 
string ToStringFull ()
 Returns most interesting room values as string, including custom properties. More...
 

Public Attributes

bool RemovedFromList
 Used in lobby, to mark rooms that are no longer listed (for being full, closed or hidden). More...
 
int masterClientId
 Backing field for master client id (actorNumber). defined by server in room props and ev leave. More...
 

Protected Attributes

byte maxPlayers = 0
 Backing field for property. More...
 
int emptyRoomTtl = 0
 Backing field for property. More...
 
int playerTtl = 0
 Backing field for property. More...
 
string[] expectedUsers
 Backing field for property. More...
 
bool isOpen = true
 Backing field for property. More...
 
bool isVisible = true
 Backing field for property. More...
 
bool autoCleanUp = true
 Backing field for property. False unless the GameProperty is set to true (else it's not sent). More...
 
string name
 Backing field for property. More...
 
string[] propertiesListedInLobby
 Backing field for property. More...
 

Properties

Hashtable CustomProperties [get]
 Read-only "cache" of custom properties of a room. Set via Room.SetCustomProperties (not available for RoomInfo class!). More...
 
string Name [get]
 The name of a room. Unique identifier for a room/match (per AppId + game-Version). More...
 
int PlayerCount [get]
 Count of players currently in room. This property is overwritten by the Room class (used when you're in a Room). More...
 
byte MaxPlayers [get]
 The limit of players for this room. This property is shown in lobby, too. If the room is full (players count == maxplayers), joining this room will fail. More...
 
bool IsOpen [get]
 Defines if the room can be joined. This does not affect listing in a lobby but joining the room will fail if not open. If not open, the room is excluded from random matchmaking. Due to racing conditions, found matches might become closed even while you join them. Simply re-connect to master and find another. Use property "IsVisible" to not list the room. More...
 
bool IsVisible [get]
 Defines if the room is listed in its lobby. Rooms can be created invisible, or changed to invisible. To change if a room can be joined, use property: open. More...
 

Detailed Description

A simplified room with just the info required to list and join, used for the room listing in the lobby. The properties are not settable (IsOpen, MaxPlayers, etc).

This class resembles info about available rooms, as sent by the Master server's lobby. Consider all values as readonly. None are synced (only updated by events by server).

Member Function Documentation

◆ Equals()

override bool Photon.Realtime.RoomInfo.Equals ( object  other)
inline

Makes RoomInfo comparable (by name).

◆ GetHashCode()

override int Photon.Realtime.RoomInfo.GetHashCode ( )
inline

Accompanies Equals, using the name's HashCode as return.

Returns

◆ ToString()

override string Photon.Realtime.RoomInfo.ToString ( )
inline

Returns most interesting room values as string.

Returns
Summary of this RoomInfo instance.

◆ ToStringFull()

string Photon.Realtime.RoomInfo.ToStringFull ( )
inline

Returns most interesting room values as string, including custom properties.

Returns
Summary of this RoomInfo instance.

Member Data Documentation

◆ autoCleanUp

bool Photon.Realtime.RoomInfo.autoCleanUp = true
protected

Backing field for property. False unless the GameProperty is set to true (else it's not sent).

◆ emptyRoomTtl

int Photon.Realtime.RoomInfo.emptyRoomTtl = 0
protected

Backing field for property.

◆ expectedUsers

string [] Photon.Realtime.RoomInfo.expectedUsers
protected

Backing field for property.

◆ isOpen

bool Photon.Realtime.RoomInfo.isOpen = true
protected

Backing field for property.

◆ isVisible

bool Photon.Realtime.RoomInfo.isVisible = true
protected

Backing field for property.

◆ masterClientId

int Photon.Realtime.RoomInfo.masterClientId

Backing field for master client id (actorNumber). defined by server in room props and ev leave.

◆ maxPlayers

byte Photon.Realtime.RoomInfo.maxPlayers = 0
protected

Backing field for property.

◆ name

string Photon.Realtime.RoomInfo.name
protected

Backing field for property.

◆ playerTtl

int Photon.Realtime.RoomInfo.playerTtl = 0
protected

Backing field for property.

◆ propertiesListedInLobby

string [] Photon.Realtime.RoomInfo.propertiesListedInLobby
protected

Backing field for property.

◆ RemovedFromList

bool Photon.Realtime.RoomInfo.RemovedFromList

Used in lobby, to mark rooms that are no longer listed (for being full, closed or hidden).

Property Documentation

◆ CustomProperties

Hashtable Photon.Realtime.RoomInfo.CustomProperties
get

Read-only "cache" of custom properties of a room. Set via Room.SetCustomProperties (not available for RoomInfo class!).

All keys are string-typed and the values depend on the game/application.

Room.SetCustomProperties

◆ IsOpen

bool Photon.Realtime.RoomInfo.IsOpen
get

Defines if the room can be joined. This does not affect listing in a lobby but joining the room will fail if not open. If not open, the room is excluded from random matchmaking. Due to racing conditions, found matches might become closed even while you join them. Simply re-connect to master and find another. Use property "IsVisible" to not list the room.

As part of RoomInfo this can't be set. As part of a Room (which the player joined), the setter will update the server and all clients.

◆ IsVisible

bool Photon.Realtime.RoomInfo.IsVisible
get

Defines if the room is listed in its lobby. Rooms can be created invisible, or changed to invisible. To change if a room can be joined, use property: open.

As part of RoomInfo this can't be set. As part of a Room (which the player joined), the setter will update the server and all clients.

◆ MaxPlayers

byte Photon.Realtime.RoomInfo.MaxPlayers
get

The limit of players for this room. This property is shown in lobby, too. If the room is full (players count == maxplayers), joining this room will fail.

As part of RoomInfo this can't be set. As part of a Room (which the player joined), the setter will update the server and all clients.

◆ Name

string Photon.Realtime.RoomInfo.Name
get

The name of a room. Unique identifier for a room/match (per AppId + game-Version).

◆ PlayerCount

int Photon.Realtime.RoomInfo.PlayerCount
get

Count of players currently in room. This property is overwritten by the Room class (used when you're in a Room).


The documentation for this class was generated from the following file: