Skip to main content

Game logic network latency reporting (PostNetworkLatencyInSession) [Player Network SDK only]

[Player Network SDK only] Performance data collection.

Reporting game logic network latency can directly reflect the current interaction delay between the game client and server.

note

It is recommended to call in each frame callback.However, if considering performance for low-end mobile phones, try to ensure that the majority of frames per second can still make the call.If you choose to call it every few frames, there may be frame drops leading to null data in the statistics, and the more frames you skip, the higher the risk.

Supported platforms

Supports Android, iOS, Windows platform.

Function Definition

void PostNetworkLatencyInSession(int latencyMs);

Input Parameters

ParametersTypeDescription
latencyMsintNetwork latency
Unit: milliseconds

Code Example

UnionAdapterAPI.GetReportService().PostNetworkLatencyInSession(50);