Skip to main content

Overview - Introduction to Session - (Unity module)

Last updated on June 12, 2024

Introduction

Session is the essential part of AccelByte Gaming Services (AGS) multiplayer offerings. In this module, you will learn how to implement the basic functionalities of Session into your game, which will prepare you for features such as Party, Matchmaking, Match Session, or Custom Match multiplayer.

Prerequisites

In order to start on this module, you will need:

  • To have completed the following module:

  • The Byte Wars tutorialmodules branch checked out in your local Byte Wars Unity project repository.

  • To force enable this module by adding the following code to the Assets/Resources/Modules/TutorialModuleConfig.json file:

    {
    "enableModulesOverride": true,
    "forceEnabledModules": ["SessionEssentials"],
    "forceDisabledOtherModules" : true,
    }

Learning objectives

At the end of this module, you will know how to implement:

  • Creating a session.
  • Joining a session.
  • Leaving a session.

Preview

At the end of this module, your project will look like the images below and display the following logs:

A GIF of selecting a new game session in Byte Wars in the Unity Editor Unity Byte Wars introduction to session

[SessionEssentialsWrapper_Starter.cs] [OnCreateSessionCompleted] [Log] [116] - Successfully created game session

A GIF of leaving a new game session in Byte Wars in the Unity Editor Unity Byte Wars introduction to session

[SessionEssentialsWrapper_Starter.cs] [OnLeaveSessionCompleted] [Log] [162] - Successfully left the game session