SetUserValue
[Player Network SDK & MSDK] Sets key-value pairs and reports them with crash information.
Supported channel: Firebase, CrashSight
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.note
MSDK currently does not support Windows.
Function Definition
- Unity
- Unreal Engine
void SetUserValue(string k, string v);
static void SetUserValue(const std::string &key, const std::string &value);
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| key | string | Key The key must be a regular expression [a-zA-Z[0-9]]+ within 50 bytes. For more information, see CrashSight Documentation - Set Custom Map Parameters. |
| value | string | Value The value must be within 200 bytes. |
| Parameter | Type | Description |
|---|---|---|
| Key | std::string | Key The key must be a regular expression [a-zA-Z[0-9]]+ within 50 bytes. For more information, see CrashSight Documentation - Set Custom Map Parameters. |
| Value | std::string | Value The value must be within 200 bytes. |
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetCrashService().SetUserValue("key", "value");
GUA_NAMESPACE::GUACrashService::SetUserValue("Key", "Value");