UCharacterMovementComponent::ShouldUsePackedMovementRPCs
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualconstENGINE_API
Description
Determines whether the packed, variable-length movement RPC path is used instead of the legacy fixed-parameter ServerMove RPCs.
Caveats & Gotchas
- • The default implementation just checks the console variable p.NetUsePackedMovementRPCs and returns true if non-zero — it isn't derived from any per-component state.
- • Mixing packed and legacy clients in the same session isn't supported; this needs to resolve consistently for client and server.
- • Overriding this to return false requires defining SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 in the project, otherwise the legacy RPC functions are compiled out.
Signature
virtual bool ShouldUsePackedMovementRPCs() const Return Type
bool Example
Check which RPC path is active C++
if (CharacterMovementComponent->ShouldUsePackedMovementRPCs())
{
UE_LOG(LogTemp, Log, TEXT("Using packed movement RPCs"));
} See Also
Version History
Introduced in: 4.26
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?