Skip to content

Commit d8b6fe0

Browse files
updating session management example to reflect change in sample (#563)
Co-authored-by: Sara [Unity] <[email protected]>
1 parent 0ea5660 commit d8b6fe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/advanced-topics/session-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/de
3434

3535
This class allows BossRoom to handle player session data, represented by a struct `T` implementing the `ISessionPlayerData` interface, by providing mechanisms to initialize, obtain and edit that data, and to associate it to a specific player. It also handles the clearing of data that is no longer used and the reinitialization of data between sessions.
3636

37-
In this case, since game sessions are quite short, the session data is only cleared for disconnected players when a session ends, and when a new one begins. This makes sure that if a player disconnects during a session and then reconnects during the next session, the game properly treats it as a new connection. The definition of when a session ends and when a session starts might vary from game to game, but in BossRoom a session is considered to start after character selection and end when the players win or loose the game and enter the post-game scene. In other cases, one might want to add a timeout to session data and clear it after a specified time instead.
37+
In this case, since game sessions are quite short, the session data is only cleared for disconnected players when a session ends, or if a player leaves before a session starts. This makes sure that if a player disconnects during a session and then reconnects during the next session, the game properly treats it as a new connection. The definition of when a session ends and when a session starts might vary from game to game, but in BossRoom a session is considered to start after character selection and end when the players win or loose the game and enter the post-game scene. In other cases, one might want to add a timeout to session data and clear it after a specified time instead.
3838

3939
This code is in Boss Room's utilities package so it can be easily reused.

0 commit comments

Comments
 (0)