Navigation
API > API/Runtime > API/Runtime/IrisCore > API/Runtime/IrisCore/Iris > API/Runtime/IrisCore/Iris/ReplicationSystem
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UReplicationBridge
- UObjectReplicationBridge
References
| Module | IrisCore |
| Header | /Engine/Source/Runtime/Experimental/Iris/Core/Public/Iris/ReplicationSystem/ObjectReplicationBridge.h |
| Include | #include "Iris/ReplicationSystem/ObjectReplicationBridge.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UObjectReplicationBridge : public UReplicationBridge
Remarks
Partial implementation of ReplicationBridge that can be used as a foundation for implementing support for replicating objects derived from UObject
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bSuppressCreateInstanceFailedEnsure |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddDependentObject
(
FNetRefHandle Parent, |
Adds a dependent object. | |
| void | AddStaticDestructionInfo
(
const FString& ObjectPath, |
Add static destruction info, this is used when stably named objects are destroyed prior to starting replication | |
| uint8 | ConvertPollFrequencyIntoFrames
(
float PollFrequency |
Transform a poll frequency (in updates per second) to an equivalent number of frames. | |
| FString | DescribeObjectReference
(
const UE::Net::FNetObjectReference& ObjectRef, |
Describe the NetObjectReference | |
| void | DestroyInstanceFromRemote
(
const FDestroyInstanceParams& Params |
Destroy or tear-off the game instance on request from remote. | |
| TArray< uint32 > | FindConnectionsFromArgs
(
const TArray< FString >& Args |
Parses a list of arguments and returns a list of Connection's that match them Ex: ConnectionId=1 or ConnectionId=1,5,7 | |
| bool | FindOrCachePollFrequency
(
const UClass* Class, |
Finds the final poll frequency for a class and cache it for future lookups. | |
| bool | GetClassPollFrequency
(
const UClass* Class, |
Find the poll period of a class if it was configured with an override. | |
| UE::Net::FNetObjectFilterHandle | GetDynamicFilter
(
const UClass* Class, |
Retrieves the dynamic filter to set for the given class. | |
| FInstanceGetWorldObjectInfoFunction | Get the function that we should call to get the world location of an object. | ||
| FInstancePreUpdateFunction | Get the function that we should call before copying state data. | ||
| float | Current max tick rate set by the engine | ||
| UObject * | GetObjectFromReferenceHandle
(
FNetRefHandle RefHandle |
Lookup the UObject associated with the provided Handle. | |
| bool | GetObjectWantsToBeDormant
(
FNetRefHandle Handle |
Returns whether the object wants to be dormant. | |
| UE::Net::FNetObjectReference | GetOrCreateObjectReference
(
const UObject* Instance |
Get or create NetObjectReference for object instance. | |
| UE::Net::FNetObjectReference | GetOrCreateObjectReference
(
const FString& Path, |
Get or create NetObjectReference for object identified by path relative to outer. | |
| float | GetPollFrequencyOfRootObject
(
const UObject* ReplicatedObject |
Returns the poll frequency of a specific root object. | |
| UObject * | GetReplicatedObject
(
FNetRefHandle Handle |
Get the Object from a replicated handle, if the handle is invalid or not is a replicated handle the function will return nullptr | |
| FNetRefHandle | GetReplicatedRefHandle
(
FNetHandle Handle |
Get NetRefHandle from a NetHandle. | |
| FNetRefHandle | GetReplicatedRefHandle
(
const UObject* Object, |
Get NetRefHandle from a replicated UObject. | |
| FNetRefHandle | GetRootObjectOfSubObject
(
FNetRefHandle SubObjectHandle |
Get the handle of the root object of any replicated subobject. | |
| bool | IsClassCritical
(
const UClass* Class |
Returns true if the class is considered critical and we force a disconnection if a protocol mismatch prevents instances of this class from replicating. | |
| void | LoadConfig () |
Re-initialize config-driven parameters found in ObjectReplicationBridgeConfig. | |
| void | NetFlushDormantObject
(
FNetRefHandle Handle |
Trigger a single poll to refresh the dirty values of a dormant object. | |
| bool |
ObjectLevelHasFinishedLoading
(
UObject* Object |
Returns true of the level that the Object belongs to has finished loading. | |
| void | OnProtocolMismatchDetected
(
FNetRefHandle ObjectHandle |
Called when we found a divergence between the local and remote protocols when trying to instantiate a remote replicated object. | |
| void | OnSubObjectCreatedFromReplication
(
FNetRefHandle SubObjectHandle |
Invoked for new replicated SubObjects after state has been applied to owner | |
| void | PrintAlwaysRelevantObjects
(
uint32 ArgTraits |
||
| FString | PrintConnectionInfo
(
uint32 ConnectionId |
Returns the most relevant description of the client tied to this connection id. | |
| void | Debug functions that are triggered via console commands. | ||
| void | PrintNetCullDistances
(
const TArray< FString >& Args |
||
| void | |||
| void | PrintRelevantObjects
(
uint32 ArgTraits |
||
| void | PrintRelevantObjectsForConnections
(
const TArray< FString >& Args |
||
| void | PrintReplicatedObjects
(
uint32 ArgTraits |
||
| void | Re-initialize the poll frequency of all replicated root objects. | ||
| bool | RemapPathForPIE
(
uint32 ConnectionId, |
PIE package name remapping support. | |
| void | RemoveDependentObject
(
FNetRefHandle Parent, |
Remove dependent object from parent. | |
| UObject * | ResolveObjectReference
(
const UE::Net::FNetObjectReference& ObjectRef, |
Try to resolve UObject from NetObjectReference, this function tries to resolve the object by loading if necessary. | |
| void | SetClassDynamicFilterConfig
(
FName ClassPathName, |
||
| void | SetClassDynamicFilterConfig
(
FName ClassPathName, |
Set the object filter to use for objects of this class and any derived classes without an explicit config. | |
| void | SetClassTypeStatsConfig
(
FName ClassPathName, |
Set the TypeStats to use for specified class and any derived classes without explicit config | |
| void | SetClassTypeStatsConfig
(
const FString& ClassPathName, |
||
| void | SetInstanceGetWorldObjectInfoFunction
(
FInstanceGetWorldObjectInfoFunction InGetWorldObjectInfoFunction |
Set the function that we should call to get the world location of an object. | |
| void | SetInstancePreUpdateFunction
(
FInstancePreUpdateFunction InPreUpdateFunction |
Set the function that we should call before copying state data. | |
| void | SetMaxTickRate
(
float InMaxTickRate |
Change the max tick rate to match the one from the engine | |
| void | SetObjectWantsToBeDormant
(
FNetRefHandle Handle, |
Set whether object should go dormant. | |
| void | SetPollFrequency
(
FNetRefHandle RootHandle, |
Set poll frequency on root object and its subobjects. They will be polled on the same frame. | |
| void | SetPollWithObject
(
FNetRefHandle ObjectToPollWith, |
Force polling of Object when ObjectToPollWith is polled. | |
| void | SetShouldSubclassUseSameFilterFunction
(
TFunction< bool(const UClass*Class, const UClass*Subclass)> |
Set the function used to determine whether two classes are to be considered equal when it comes to filtering. | |
| void | SetShouldUseDefaultSpatialFilterFunction
(
TFunction< bool(const UClass*)> |
Set the function used to determine whether an object should use the default spatial filter unless the class is configured to use some other filter. | |
| void | SetSubObjectNetCondition
(
FNetRefHandle SubObjectHandle, |
Set NetCondition for a subobject, the condition is used to determine if the SubObject should replicate or not. | |
| bool | Getter for CVar net.Iris.UseVerboseIrisCsvStats which is true if we want per-class iris stats output to CSV | ||
| FNetRefHandle | StartReplicatingRootObject
(
UObject* Instance, |
Start replicating a RootObject and return a valid NetRefHandle if successful. | |
| FNetRefHandle | StartReplicatingSubObject
(
UObject* Instance, |
Start replicating a SubObject and return a valid NetRefHandle if successful. | |
| void | StopReplicatingNetObject
(
UObject* Instance, |
Stop replicating any type of NetObject. |
Overridden from UReplicationBridge
| Type | Name | Description | |
|---|---|---|---|
| bool | CacheNetRefHandleCreationInfo
(
FNetRefHandle Handle |
Cache info required to allow deferred writing of NetRefHandleCreationInfo | |
| FReplicationBridgeCreateNetRefHandleResult | CreateNetRefHandleFromRemote
(
FNetRefHandle RootObjectOfSubObject, |
Read data required to instantiate NetObject from bitstream. | |
| void | Deinitialize () |
Deinitializes the bridge. Is called during ReplicationSystem deinitialization. | |
| void | DetachInstance
(
FNetRefHandle Handle |
Called when we detach instance protocol from the local instance | |
| void | DetachInstanceFromRemote
(
FNetRefHandle Handle, |
Called when the instance is detached from the protocol on request by the remote. | |
| void | Initialize
(
UReplicationSystem* InReplicationSystem |
Initializes the bridge. Is called during ReplicationSystem initialization. | |
| void | OnErrorWithNetRefHandleReported
(
UE::Net::ENetRefHandleError ErrorType, |
Called when a remote connection has a critical error caused by a specific NetRefHandle | |
| void | Invoked after we sent data to all connections. | ||
| void | OnProtocolMismatchReported
(
FNetRefHandle RefHandle, |
Called when a remote connection detected a protocol mismatch when trying to instantiate the NetRefHandle replicated object. | |
| void | Invoked when the ReplicationSystem starts the PreSendUpdate tick. | ||
| void | PostApplyInitialState
(
UE::Net::Private::FInternalNetRefIndex InternalObjectIndex |
Invoked after we have applied the initial state for an object. | |
| void | Invoked before ReplicationSystem copies dirty state data. | ||
| void | PreSendUpdateSingleHandle
(
FNetRefHandle Handle |
Invoked before ReplicationSystem copies dirty state data for a single replicated object. | |
| void | Invoked post garbage collect to allow us to detect stale objects | ||
| void | SubObjectCreatedFromReplication
(
FNetRefHandle SubObjectRefHandle |
Invoked right before we apply the state for a new received subobject but after we have applied state for owning/root object in order to behave like old replication system | |
| void | Update world locations in FWorldLocations for objects that support it. | ||
| bool | WriteNetRefHandleCreationInfo
(
FReplicationBridgeSerializationContext& Context, |
Write data required to instantiate NetObject remotely to bitstream. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FDestroyInstanceParams | |||
| FRootObjectReplicationParams | |||
| FSubObjectReplicationParams |
Typedefs
| Name | Description |
|---|---|
| EGetRefHandleFlags | |
| FInstanceGetWorldObjectInfoFunction | Helper method to get the world location & cull distance for replicated instances with the HasWorldLocation trait. |
| FInstancePreUpdateFunction | Helper method that calls provided PreUpdateFunction and polls state data for all replicated instances with the NeedsPoll trait. |