Skip to main content

MarkSessionLoad [Player Network SDK Only]

[Player Network SDK Only] This API marks the start of the data collection session.

Under normal conditions, Player Network SDK does not collect performance data. It will only start to collect performance data after a session start marker and then upload the data to the SDK server.

Sessions in Player Network SDK have purely logical significance. They have no direct association with physical scenes. Therefore, the session marker API can be called at any location. Generally, it is called before the Application.LoadLevel function in Unity.

If users add the ID of the battle server to be measured in extra_json in the session marker, the network latency speed measurement will start automatically.

Supported Platform

Supports Android, iOS, Windows platform.

Function Definition

void MarkSessionLoad(string sessionName,string extra_json)

Input Parameters

ParameterTypeDescription
sessionNamestringSession name
extra_jsonstringAdditional parameters as a JSON string defined by the game

Additional Parameter JSON String

ParameterTypeDescription
GAME_BATTLE_SERVER_IDstringID of battle server for speed testing

Code Sample

string sessionName = "UnityScene";
string extra_json = "{\"GAME_BATTLE_SERVER_ID\":\"id\"}";
UnionAdapterAPI.GetReportService().MarkSessionLoad("UnityScene", extra_json); // Start the network speed test