UActorComponent::OnReplicationStartedForIris
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtual
Description
Called by the Iris replication system when this component begins replicating. Override to perform setup that should only happen when Iris-based replication starts. Do not call this explicitly.
Caveats & Gotchas
- • This is the Iris replacement for the deprecated BeginReplication; it is only called when the project has Iris enabled. Projects still using the legacy stack will never hit this path.
- • The FOnReplicationStartedParams struct is empty in 5.6 but is expected to carry context in future versions — store the reference rather than ignoring it to future-proof overrides.
Signature
ENGINE_API virtual void OnReplicationStartedForIris(const FOnReplicationStartedParams&) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| (unnamed) | const FOnReplicationStartedParams& | Parameters struct for this callback (currently empty, reserved for future use). | — |
Return Type
void Example
React to Iris replication start C++
void UMyComponent::OnReplicationStartedForIris(const FOnReplicationStartedParams& Params)
{
Super::OnReplicationStartedForIris(Params);
// Initialise replication-dependent state now that Iris has started
bReplicationActive = true;
} Tags
Version History
Introduced in: 5.1
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?