APlayerState::DispatchCopyProperties
#include "GameFramework/PlayerState.h"
Access: public
Specifiers: ENGINE_API
Description
Calls the internal CopyProperties method and then fires the Blueprint-implementable ReceiveCopyProperties event, used during seamless travel to propagate state to the new PlayerState.
Caveats & Gotchas
- • Do not override this function — override CopyProperties (C++) or implement ReceiveCopyProperties in Blueprint; this is an engine-internal dispatch trampoline.
- • Called during seamless travel from SeamlessTravelTo; during non-seamless travel the inactive-player path (Duplicate/OverrideWith) is used instead.
Signature
void DispatchCopyProperties(APlayerState* PlayerState) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PlayerState | APlayerState* | The destination PlayerState to copy properties into. | — |
Return Type
void Example
Copy custom properties in C++ via CopyProperties override C++
// Override CopyProperties — not DispatchCopyProperties
void AMyPlayerState::CopyProperties(APlayerState* NewState)
{
Super::CopyProperties(NewState);
if (AMyPlayerState* NewPS = Cast<AMyPlayerState>(NewState))
{
NewPS->MatchScore = MatchScore;
NewPS->TeamIndex = TeamIndex;
}
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?