APlayerState::GetPingInMilliseconds

Returns the ping (in milliseconds)

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerState.h

Include

#include "GameFramework/PlayerState.h"

Source

/Engine/Source/Runtime/Engine/Private/PlayerState.cpp

Syntax

float GetPingInMilliseconds() const

Remarks

Returns the ping (in milliseconds)

Returns ExactPing if available (local players or when running on the server), and the replicated CompressedPing (converted back to milliseconds) otherwise.

Note that replication of CompressedPing is controlled by bShouldUpdateReplicatedPing, and if disabled then this will return 0 or a stale value on clients for player states that aren't related to local players

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel