UActorComponent::OnStopReplicationForIris
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtual
Description
Called by the Iris replication system just before this component stops replicating. Override to tear down any state set up in OnReplicationStartedForIris. Do not call this explicitly.
Caveats & Gotchas
- • This replaces the deprecated EndReplication for Iris-enabled projects. On the legacy networking stack this is never called — use EndPlay for cleanup that must happen in both stacks.
- • The component may still exist after this is called; it has only stopped replicating, not been destroyed. Do not treat this as equivalent to EndPlay or OnUnregister.
Signature
ENGINE_API virtual void OnStopReplicationForIris(const FOnStopReplicationParams&) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| (unnamed) | const FOnStopReplicationParams& | Parameters struct for this callback (currently empty, reserved for future use). | — |
Return Type
void Example
Clean up on Iris replication stop C++
void UMyComponent::OnStopReplicationForIris(const FOnStopReplicationParams& Params)
{
Super::OnStopReplicationForIris(Params);
bReplicationActive = false;
FlushReplicationCache();
} Tags
Version History
Introduced in: 5.1
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?