Set up AGS Unity SDK Guide
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 Type | Displayed Log |
---|---|
Verbose | This is the default setting, Display all log and SDK log messages, like: • SDK HttpRequest/Response • SDK function triggered • Websocket Notifications |
Log | Display all log messages |
Warning | Display warning, assert, error, and exception log messages |
Assert | Display assert, error, and exception log messages |
Error | Display error and exception log messages |
Exception | Display 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.
Open your Unity Project.
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.
Go to the Log Configs to see the debug log configuration.
Check the
Enable Debug Log
check box to enable the debug log.Select the
Log Type Filter
dropdown based on your preference.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.
- Open your Unity Project.
- Open one of these files inside Assets/Resources directory.
AccelByteSDKConfig.json
file for the clientAccelByteServerSDKConfig.json
file for the server
- Choose your environment from that file.
- Set up the
EnableDebugLog
to enable (or disable) the debug log andDebugLogFilter
to filter the debug log using your preference LogType. Here is an example:
{
"Default": {
...
"EnableDebugLog": true,
"DebugLogFilter": "verbose",
...
}
}