RoomButton
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
_password
database
indexToLoad
isOpen
maxNumOfPlayers
numberOfPlayers
roomName
_password
The password required for this room. Do not set here unless used for testing.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | ”” |
database
The database that holds all the information about all given scenes.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | SceneDatabase | None |
indexToLoad
The scene index to load when this room button is clicked.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | int | 0 |
isOpen
The text that will display if a player is in a lobby or not
| Exposed Value | Type | Default Value |
|---|---|---|
| public | Text | null |
maxNumOfPlayers
The text that will display the max number of players in this room
| Exposed Value | Type | Default Value |
|---|---|---|
| public | Text | null |
numberOfPlayers
The text that will display the current number of players in this room
| Exposed Value | Type | Default Value |
|---|---|---|
| public | Text | null |
roomName
The text that will display what the name of this room is.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | Text | null |
Function Definitions
Select the function name from below to jump directly to it on this page.
AddAvailableScene
JoinLobby
JoinRoom
SetRoomName
SetRoomValues
SetTotalPlayerCount
SetValues
public virtual void AddAvailableScene(LobbyItem sceneItem)
Sets the values of this component based on this input.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| sceneItem | LobbyItem type, Extracts the photon room name from this |
public virtual void JoinLobby()
Calls
UICoreLogic’sJoinRoomfunction with this set room name.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void JoinRoom()
Calls the
NetworkManager’sJoinRoomfunction with the saved room name. If the current scene index also doesn’t match it calls theNetworkLoadLevelfunction from theNetworkManageras well.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void SetRoomName(string inputRoomName)
Set the name of the photon room to join when clicking this room button based on the
inputRoomName
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| inputRoomName | string type, the photon room name to join. |
public virtual void SetRoomValues(RoomInfo room, string openText = “OPEN”, string closedText = “CLOSED”)
Set the display values based on the input values.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| room | RoomInfo type, extracts room info to display based on this |
| openText | string type, the string to display if the room is open |
| closedText | string type, the string to display if the room is closed |
public virtual void SetTotalPlayerCount()
Sets the
numberOfPlayersstring value to be the total number of players currently in this photon room.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void SetValues(string inputRoomName, int numOfPlayers, bool inputIsOpen, string roomDisplayName = null)
Sets the display values based on the input values.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| inputRoomName | string type, the name of the room to join |
| numOfPlayers | int type, the number of players currently in this room. |
| inputIsOpen | bool type, is this room currently joinable? |
| roomDisplayName | string type, the name of the room to display |