AActor::GetReplicateMovementPropertyName
#include "GameFramework/Actor.h"
Access: public
Specifiers: static
Description
Returns the FName of the bReplicateMovement property on AActor, intended for use in lifetime property registration without requiring direct access to the private member.
Caveats & Gotchas
- • This is a helper for engine-internal and plugin code that needs to reference the bReplicateMovement property by name (e.g. in DOREPLIFETIME_CONDITION_NOTIFY macros or property paths) without coupling to the private field.
- • The returned name is generated via GET_MEMBER_NAME_CHECKED so it is compile-time validated — it will break the build if the underlying property is renamed, which is intentional.
- • Gameplay code that simply wants to toggle movement replication should set bReplicateMovement directly or use SetReplicateMovement, not this function.
Signature
static const FName GetReplicateMovementPropertyName() Return Type
const FName Example
Use the property name in a replication condition C++
void AMyActor::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
// Reference bReplicateMovement by name without direct access to the private member
FName PropName = AActor::GetReplicateMovementPropertyName();
// PropName is "bReplicateMovement"
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?