Tutorial videos
Home
Developer
Discord
Search…
SWNetwork SDK Overview
Installation
Custom Unity Package
Tutorials
Third-Person Shooter
Basic Lobby
SDK
Network Client
Game Play
Lobby
Register Player
Message Player
Create Room
Change Room Settings
Get Rooms
Filter Rooms
Join Room
Message Room
Get Players in Room
Get Room Custom Data
Change Room Custom Data
Kick Players
Start Room
Leave Room
Lobby Room Events
Classes
Methods
Open Source Software Used
Credits
Powered By
GitBook
Change Room Custom Data
Overview
Changes the room custom data.
Only the room owners can change the custom data of their rooms.
Methods
​
​
ChangeRoomCustomData(string, Action<bool, SWLobbyError>)
​
Called by room owners to begin an asynchronous operation to change the custom data of their rooms using the specified string.
​
ChangeRoomCustomData(object, Action<bool, SWLobbyError>)
​
Called by room owners to begin an asynchronous operation to change the custom data of their rooms using the specified serializable object.
Class
​
​
SWLobbyError
​
The error that occurred when a lobby API operation failed.
Example
1
NetworkClient
.
Lobby
.
ChangeRoomCustomData
(
"New room name"
,
(
bool
successful
,
SWLobbyError
error
)
=>
{
2
if
(
successful
)
{
3
Debug
.
Log
(
"Changed room custom data."
);
4
}
5
else
{
6
Debug
.
Log
(
"Failed to change room custom data "
+
error
);
7
}
8
});
Copied!
Previous
Get Room Custom Data
Next
Kick Players
Last modified
2yr ago
Copy link
Contents
Overview
Example