Session Start Marker (MarkSessionLoad) [Player Network SDK only]
[Player Network SDK only] Start a data collection session.
By default, Player Network SDK does not collect performance data; performance data collection only starts after the scene start marker and is then uploaded to the SDK server.
In Player Network SDK, a scene represents a logical concept and is not directly related to a physical scene. Therefore, the scene tagging API can be called anywhere, typically before the Application.LoadLevel function in Unity.
If the battle server ID to be tested is included in extra_json within the scene marker, network latency testing will automatically begin.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void MarkSessionLoad(string sessionName,string extra_json)
static void MarkSessionLoad(const char *session_name, const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| sessionName | string | Session Name |
| extra_json | string | Game-defined extra parameter JSON string |
| Parameters | Type | Description |
|---|---|---|
| session_name | char* | Session Name |
| extra_json | std::string | Game-defined extra parameter JSON string |
Extra Parameters JSON String
| Parameters | Type | Description |
|---|---|---|
| GAME_BATTLE_SERVER_ID | string | Battle Server ID to be tested |
Code Example
- Unity
- Unreal Engine
string sessionName = "UnityScene";
string extra_json = "{\"GAME_BATTLE_SERVER_ID\":\"id\"}";
UnionAdapterAPI.GetReportService().MarkSessionLoad("UnityScene", extra_json); // Start network latency measurement
std::string extra_json = "{\"GAME_BATTLE_SERVER_ID\":\"id\"}";
GUA_NAMESPACE::GUAReportService::MarkSessionLoad("UnrealScene", extra_json); //Start network latency measurement