ConnectedLensModule.MatchmakingConfig
ClassConfiguration for matchmaking when creating a session.
- Available on all platforms
Since Lens Scripting v375
Configuration for matchmaking when creating a session. If not set on session options, no matchmaking occurs (direct session join).
Index
Properties
Methods
Extends
Properties
lobbyMode
lobbyMode:
LobbyMode
Camera Kit
How matchmaking fills the session. Unset is classic matchmaking.
Since
Lens Scripting Version 387
Default Value
ConnectedLensModule.MatchmakingConfig.LobbyMode.Unset
@cameraKit
Example
var config = ConnectedLensModule.MatchmakingConfig.create(2, 6, 4);
config.lobbyMode = ConnectedLensModule.MatchmakingConfig.LobbyMode.Open;
maxPlayerCount
readonlymaxPlayerCount:number
Maximum number of players allowed in the match. Must be at least 2 and at most 64.
Since
Lens Scripting Version 375
minPlayerCount
readonlyminPlayerCount:number
Minimum number of players required to start the match. Must be at least 1.
Since
Lens Scripting Version 375
targetPlayerCount
targetPlayerCount:
number
Target number of players that matchmaking attempts to fill for the session. Defaults to minPlayerCount if not explicitly set.
Since
Lens Scripting Version 375
Default Value
null
Methods
create()
staticcreate(minPlayerCount,maxPlayerCount,targetPlayerCount?):MatchmakingConfig
Creates a new MatchmakingConfig instance with the specified player counts.
Parameters
| Parameter | Type | Description |
|---|---|---|
minPlayerCount | number | Minimum players required (1-64) |
maxPlayerCount | number | Maximum players allowed (2-64, must be >= minPlayerCount) |
targetPlayerCount? | number | Optional. Number of players matchmaking aims to fill the session with. Omit it to leave the target unset, in which case matchmaking uses minPlayerCount. Equivalent to assigning ConnectedLensModule.MatchmakingConfig#targetPlayerCount afterwards. |
Returns
MatchmakingConfig
Since
Lens Scripting Version 375
getMaxPlayerCountLimit()
staticgetMaxPlayerCountLimit():number
Returns the maximum allowed value for maxPlayerCount.
Returns
number
Since
Lens Scripting Version 375
getMinPlayerCountLimit()
staticgetMinPlayerCountLimit():number
Returns the minimum allowed value for minPlayerCount.
Returns
number
Since
Lens Scripting Version 375
getTypeName()
staticgetTypeName():TypeName<MatchmakingConfig>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<MatchmakingConfig>
Since
Lens Scripting Version 375
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
Nested types
Enumerations
| Enumeration | Description |
|---|---|
| LobbyMode | How matchmaking fills a session. Set it on ConnectedLensModule.MatchmakingConfig#lobbyMode. |
| LobbyState | Open/close gate of an open-lobby session. Read it with MultiplayerSession#getLobbyState; the session host changes it with MultiplayerSession#setLobbyState. |