Skip to main content
Version: 6.0.0

OnMatchInGameAccess

public MatchInGameAccessEventHandler OnMatchInGameAccess;

Argument

ValueTypeDescription
argsMatchInGameSessionEventArgsBattle history of connected users

MatchInGameSessionEventArgs

ValueTypeDescription
ErrInfoErrorCodeError information
ReasonstringError information
GameRecordMatchUserGameRecordSession's information(Session ID, nickname, battle history, etc.)

Description

This event is called whenever a user enters a game room.

  • It is called to the entered user(self).
  • It is called to all users who have already connected to the game room.

In order for an event to be called, the message sending/receiving method must be called.

Event calling rules

Information of the entered user is included in GameRecord.

  • When there are Users A, B, and C
  • If User A connects to the room, the OnMatchInGameAccess event handler that contains User A's GameRecord is called.
  • If User A is connected to the room and User B connects to the room, OnMatchInGameAccess event handler that contains User B's GameRecord is called to User A and B.
  • After that, if User C enters the room, OnMatchInGameAccess event handler that contains User C's GameRecord is called to User A, B, and C.

Example

Backnd.Match.OnMatchInGameAccess = (MatchInGameSessionEventArgs args) => {
// TODO
};

Argument cases

When connection to the in-game room is established
ErrInfo : ErrorCode.Success
GameRecord : "connected user's battle history"

When the user tries to connect to a room that is not the matched room
ErrInfo : ErrorCode.Match_InGame_AuthroizeFailed
Reason : Internal server error.

When the user failed to connect to the room
ErrInfo : ErrorCode.Exception
Reason : "reason for failure"