Configuration
GameBench configuration is done either with a JSON configuration file at build time, or through APIs at runtime.
Credentials
url
URL of the GameBench server to which session data will be uploaded.
- GameBench Cloud users should use
https://web.gamebench.net/
- Private server users should use their own URL.
user
(or email
)
The email address or LDAP username associated with your GameBench account. We recommend using a dedicated email account to store GameBench sessions.
token
API token (a hex string). See the API token documentation for more details.
{
"url": "https://web.gamebench.net/",
"user": "you@yourcompany.com",
"token": "0123456789ABCDEF0123456789ABCDEF"
}
Gamebench.SetConfigItem("url", "https://web.gamebench.net/");
Gamebench.SetConfigItem("user", "you@yourcompany.com");
Gamebench.SetConfigItem("token", "0123456789ABCDEF0123456789ABCDEF");
getGameBench()->setStringConfigItem("url", "https://web.gamebench.net/");
getGameBench()->setStringConfigItem("user", "you@yourcompany.com");
getGameBench()->setStringConfigItem("token", "0123456789ABCDEF0123456789ABCDEF");
GameBench.setConfigItem("url", "https://web.gamebench.net/");
GameBench.setConfigItem("user", "you@yourcompany.com");
GameBench.setConfigItem("token", "0123456789ABCDEF0123456789ABCDEF");
Screenshots
Five sizes of screenshot are supported, their config identifiers are:
metrics.SS0
: Full-size (100%)
metrics.SS1
: ¹⁄₂ size (50%)
metrics.SS2
: ¹⁄₄ size (25%)
metrics.SS3
: ¹⁄₈ size (12.5%)
metrics.SS4
: ¹⁄₁₆ size (6.75%)
In this example a 1/8th size screenshot is scheduled to occur every 2 seconds and a full-size screenshot every 30 seconds:
{
"metrics": {
"SS0": 30.0,
"SS3": 2.0
}
}
Gamebench.SetConfigItem("metrics.SS0", 30);
Gamebench.SetConfigItem("metrics.SS3", 2);
getGameBench()->setIntConfigItem("metrics.SS0", 30);
getGameBench()->setIntConfigItem("metrics.SS3", 2);
GameBench.setConfigItem("metrics.SS0", 30);
GameBench.setConfigItem("metrics.SS3", 2);
Automation
The built-in HTTP server for automated testing is configurable:
webControlDisable
Boolean value controlling whether the HTTP server is disabled or not. Defaults to false
.
webControlPort
Integer value controlling the port the HTTP server listens on. Defaults to 8080
.
Miscellaneous
autoSession
Boolean value controlling whether sessions are automatically recorded while the application is foregrounded.
allowUx
Boolean value controlling whether the in-app GameBench UI is shown. Defaults to false
.
markSceneChanges
Unity-specific boolean value. When set to ’true’, scene changes will be automatically recorded as marker events. Default is ’true'.
verboseLog
Boolean value useful for troubleshooting, when set to ’true’ GameBench will write more information to the system log.
tags
Tags are an unordered set of comma-delimited key=value
string pairs that are useful for identifying sessions or groups of sessions in the Analysis area of the Web Dashboard.
{
"autoSession": true,
"markSceneChanges": true,
"verboseLog": false,
"tags": "foo=bar,baz=bat"
}
Gamebench.SetConfigItem("autoSession", true);
Gamebench.SetConfigItem("markSceneChanges", true);
Gamebench.SetConfigItem("verboseLog", false);
Gamebench.SetTag("foo", "bar");
Gamebench.SetTag("baz", "bat");
getGameBench()->setIntConfigItem("autoSession", 1);
getGameBench()->setIntConfigItem("markSceneChanges", 1);
getGameBench()->setIntConfigItem("verboseLog", 0);
getGameBench()->setTag("foo", "bar");
getGameBench()->setTag("baz", "bat");
GameBench.setConfigItem("autoSession", true);
GameBench.setConfigItem("markSceneChanges", true);
GameBench.setConfigItem("verboseLog", false);
GameBench.setTag("foo", "bar");
GameBench.setTag("baz", "bat");