LogoLogo
  • SWNetwork SDK Overview
  • Installation
    • Custom Unity Package
  • Tutorials
    • Third-Person Shooter
      • Starter Project Introduction
      • Install SWNetwork
      • Setting up the NetworkClient
      • Sync Player Transform
      • Setting up the Scene Spawner
      • Test and Play
      • Remote Events
      • SyncProperties
      • Player Respawn
      • Updating Room States
      • Winning the Game
    • Basic Lobby
      • Lobby-start
      • Installing SWNetwork SDK and configuring NetworkClient
      • Registering Player
      • Room CRUD
      • Managing Teams
      • Chat
  • SDK
    • Network Client
      • Check-in
      • Game Servers
      • Network Status Event (beta)
      • Classes
        • NetworkClient Class
      • Methods
        • CheckIn() Method
        • ConnectToRoom(Action<bool>) Method
        • DisconnectFromRoom () Method
        • FindSpawner(ushort) Method
    • Game Play
      • Network ID
      • Realtime Agent
      • Remote Event
      • Sync Property
        • Restore Sync Properties
        • Conflict Resolution
      • SceneSpawner
      • RoomPropertyAgent
      • RoomRemoteEventAgent
    • 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
        • OnLobbyConnectedEvent
        • OnPlayerMessageEvent
        • OnRoomCustomDataChangeEvent
        • OnNewPlayerJoinRoomEvent
        • OnPlayerLeaveRoomEvent
        • OnNewRoomOwnerEvent
        • OnRoomStartingEvent
        • OnRoomReadyEvent
        • OnFailedToStartRoomEvent
        • OnKickedEvent
        • OnRoomMessageEvent
      • Classes
        • SWLobby Class
        • SWPlayer Class
        • SWRoom Class
        • SWRegisterReply Class
        • SWGetRoomReply Class
        • SWJoinRoomReply Class
        • SWGetRoomCustomDataReply Class
        • SWGetPlayersReply Class
        • SWLobbyIndexData Class
        • SWLobbyFilterData Class
        • SWGetRoomFilterReply Class
        • SWLobbyError Class
        • SWMessagePlayerEventData Class
        • SWMessageRoomEventData Class
        • SWRoomCustomDataChangeEventData Class
        • SWJoinRoomEventData Class
        • SWLeaveRoomEventData Class
        • SWRoomChangeOwnerEventData Class
        • SWStartRoomEventData Class
        • SWRoomReadyEventData Class
        • SWFailedToStartRoomEventData Class
      • Methods
        • Register(Action<bool, SWRegisterReply, SWLobbyError>) Method
        • MessagePlayer(string, string, Action<bool, SWLobbyError>) Method
        • CreateRoom(bool, int, Action<bool, string, SWLobbyError>) Method
        • ChangeRoomSettings(int, int, Action<bool, SWLobbyError>) Method
        • GetRooms(int, int, Action<bool, SWGetRoomReply, SWLobbyError>) Method
        • FilterRoom(SWLobbyFilterData, byte, Action<bool, SWGetRoomFilterReply, SWLobbyError>) Method
        • JoinRoom(string, Action<bool, SWJoinRoomReply, SWLobbyError>) Method
        • JoinRoomRandomly(Action<bool, SWJoinRoomReply, SWLobbyError>) Method
        • JoinOrCreateRoom(bool, int, int, Action<bool, SWJoinRoomReply, SWLobbyError>) Method
        • MessageRoom(string, Action<bool, SWLobbyError>) Method
        • GetRoomCustomData(Action<bool, SWGetRoomCustomDataReply, SWLobbyError>) Method
        • GetPlayersInRoom(Action<bool, SWGetPlayersReply, SWLobbyError>) Method
        • ChangeRoomCustomData(string, Action<bool, SWLobbyError>) Method
        • StartRoom(Action<bool, SWLobbyError>) Method
        • LeaveRoom(Action<bool, SWLobbyError>) Method
  • Open Source Software Used
    • Credits
Powered by GitBook
On this page
  • Overloads
  • CreateRoom(string, bool, int, Action<bool, string, SWLobbyError>) Method
  • CreateRoom(object, bool, int, Action<bool, string, SWLobbyError>) Method
  • CreateRoom(string, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method
  • CreateRoom(object, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method
  • CreateRoom(string, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method
  • CreateRoom(object, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Was this helpful?

  1. SDK
  2. Lobby
  3. Methods

CreateRoom(bool, int, Action<bool, string, SWLobbyError>) Method

Namespace: SWNetwork.Lobby

Called by players to begin an asynchronous operation to create a room and using the specified wantRT, and PlayerLimit.

Declaration

public void CreateRoom(bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

wantRT

bool

Indicates if the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

Overloads

CreateRoom(string, bool, int, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, and PlayerLimit.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, and PlayerLimit.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

object

The serializable object room custom data

wantRT

bool

Indicates whether the room requires RealTime service

playerLimit

int

The maximum number of players can join the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

CreateRoom(string, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, PlayerLimit, and index data.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

indexData

The index data of the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, PlayerLimit, and index data.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

object

The serializable object room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

indexData

The index data of the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

CreateRoom(string, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified string room custom data, wantRT, PlayerLimit, PlayerTimeToLive, isPrivate, and index data.

Declaration

public void CreateRoom(string customData, bool wantRT, int playerLimit, int playerTimeToLive, bool isPrivate, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The string room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

playerTimeToLive

int

The maximum amount of time a player can stay inactive before been removed from the room.

isPrivate

bool

Indicates whether the room is private.

indexData

The index data of the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

CreateRoom(object, bool, int, int, bool, SWLobbyIndexData, Action<bool, string, SWLobbyError>) Method

Called by players to begin an asynchronous operation to create a room and using the specified serializable object room custom data, wantRT, PlayerLimit, PlayerTimeToLive, isPrivate, and index data.

Declaration

public void CreateRoom(object customData, bool wantRT, int playerLimit, int playerTimeToLive, bool isPrivate, SWLobbyIndexData indexData, Action<bool, string, SWLobbyError> callback)

Parameters

Type

Description

customData

string

The serializable object room custom data.

wantRT

bool

Indicates whether the room requires RealTime service.

playerLimit

int

The maximum number of players can join the room.

playerTimeToLive

int

The maximum amount of time a player can stay inactive before been removed from the room.

isPrivate

bool

Indicates whether the room is private.

indexData

The index data of the room.

callback

Action<bool,

The method to invoke when the create room operation is complete.

PreviousMessagePlayer(string, string, Action<bool, SWLobbyError>) MethodNextChangeRoomSettings(int, int, Action<bool, SWLobbyError>) Method

Last updated 5 years ago

Was this helpful?

string, >

string, >

string, >

string, >

string, >

string, >

string, >

SWLobbyError
SWLobbyError
SWLobbyError
SWLobbyIndexData
SWLobbyError
SWLobbyIndexData
SWLobbyError
SWLobbyIndexData
SWLobbyError
SWLobbyIndexData
SWLobbyError