UCharacterMovementComponent::GetPredictionData_Client_Character
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Description
Returns the concrete Character-specific client prediction data (saved moves, pending move, network smoothing state), allocating it on first use.
Caveats & Gotchas
- • This is the practical entry point for inspecting or extending client-side saved-move data — most custom movement prediction code (e.g. custom FSavedMove_Character subclasses) works through this rather than GetPredictionData_Client().
- • Only meaningful on a network client; calling it on a dedicated server just allocates unused client bookkeeping.
- • The returned pointer is owned by the movement component (cached on ClientPredictionData) — do not delete it yourself.
Signature
class FNetworkPredictionData_Client_Character* GetPredictionData_Client_Character() const Return Type
FNetworkPredictionData_Client_Character* Example
Inspecting the current saved move C++
FNetworkPredictionData_Client_Character* ClientData = GetCharacterMovement()->GetPredictionData_Client_Character();
if (ClientData && ClientData->PendingMove.IsValid())
{
UE_LOG(LogTemp, Verbose, TEXT("Pending move timestamp: %f"), ClientData->PendingMove->TimeStamp);
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?