Skip to main content

Set up AGS Unity SDK Guide

Last updated on December 17, 2024

Overview

The AccelByte Gaming Services (AGS) Unity SDK enables you to display a debug log. The log will capture requests, responses, and other related data from the SDK so that you can debug services when integrating them with your game. This debug log is configurable for the client and server. You can disable it when publishing the game and set up a filter for which types of messages are included.

Log filter

You can filter which messages are included in the log by defining the Log Type, as seen below:

Log TypeDisplayed Log
VerboseThis is the default setting, Display all log and SDK log messages, like:
• SDK HttpRequest/Response
• SDK function triggered
• Websocket Notifications
LogDisplay all log messages
WarningDisplay warning, assert, error, and exception log messages
AssertDisplay assert, error, and exception log messages
ErrorDisplay error and exception log messages
ExceptionDisplay exception log messages

Set up the log

To set up the log, you can do that in the Editor or from the AccelByte SDK Configuration manually.

Set up log using editor

Follow this step to set up the client or server debug log from AGS Unity SDK using Unity.

  1. Open your Unity Project.

  2. Use one of these options to set up the debug log:

    • Go to AccelByte > Edit Client Settings in the menu bar to edit client configuration.
    • Go to AccelByte > Edit Server Settings in the menu bar to edit server configuration.
  3. Go to the Log Configs to see the debug log configuration. Using the editor

  4. Check the Enable Debug Log check box to enable the debug log.

  5. Select the Log Type Filter dropdown based on your preference.

  6. Click Save button to save the configuration.

Set up debug log manually

Follow these steps to set up the client or server debug log from the AGS Unity SDK from a file.

  1. Open your Unity Project.
  2. Open one of these files inside Assets/Resources directory.
    • AccelByteSDKConfig.json file for the client
    • AccelByteServerSDKConfig.json file for the server
  3. Choose your environment from that file.
  4. Set up the EnableDebugLog to enable (or disable) the debug log and DebugLogFilter to filter the debug log using your preference LogType. Here is an example:
{
"Default": {
...
"EnableDebugLog": true,
"DebugLogFilter": "verbose",
...
}
}