unreal.MultiUserReplicationSubsystem

class unreal.MultiUserReplicationSubsystem(outer: Object | None = None, name: Name | str = 'None')

Bases: EngineSubsystem

Exposes ways to interact with the Multi-user replication system via Blueprints.

C++ Source:

  • Plugin: MultiUserClient

  • Module: MultiUserClientLibrary

  • File: MultiUserReplicationSubsystem.h

Editor Properties: (see get_editor_property/set_editor_property)

  • on_client_authority_server_state_changed (OnServerStateChanged): [Read-Write] Event triggered a client changes the objects it is replicating.

  • on_client_stream_server_state_changed (OnServerStateChanged): [Read-Write] Event triggered when the following changes about a client: - The registered object to properties bindings - The registered replication frequency setting of an object

  • on_offline_client_content_changed (OnServerStateChanged): [Read-Write] Event triggered when the content that an offline client will attempt to re-claim changes.

  • on_offline_clients_changed (OnOfflineClientsChanged): [Read-Write] Event triggered when the local list of offline clients has changed.

get_object_replication_frequency(client_id, object_path) MultiUserObjectReplicationSettings or None

note: An object can be registered but not replicated. see: UMultiUserSubsystem::GetLocalClientId and UMultiUserSubsystem::GetRemoteClientIds

Parameters:
Returns:

Whether OutFrequency was modified.

out_frequency (MultiUserObjectReplicationSettings):

Return type:

MultiUserObjectReplicationSettings or None

get_offline_client_ids() Array[Guid]
Returns:

The list of offline clients. Each entry is an endpoint ID that a user had in the past.

Return type:

Array[Guid]

get_owning_offline_clients(object_path) Array[Guid]

A list of offline clients that, upon rejoining a session, will attempt to reclaim properties they previously registered for an object, regardless of whether the client left gracefully or due to a crash.

By default, when a client disconnects (either gracefully or due to a crash) and later rejoins a session, the client attempts to re-register the properties it had previously registered for the object.

Parameters:

object_path (SoftObjectPath)

Returns:

A list of client descriptions representing offline clients that will attempt to reclaim properties associated with the object when they rejoin.

Return type:

Array[Guid]

get_properties_registered_to_object(client_id, object_path) Array[ConcertPropertyChainWrapper]

note: An object can be registered but not replicated. Use IsReplicatingObject to find out whether the client is replicating the returned properties. see: UMultiUserSubsystem::GetLocalClientId and UMultiUserSubsystem::GetRemoteClientIds.

Parameters:
Returns:

The properties the client has registered for replication for the object.

Return type:

Array[ConcertPropertyChainWrapper]

get_registered_objects(client_id) Array[SoftObjectPath]

Gets the objects the online or offline client has registered with the server.

Just because an object is returned here, it does not mean that the object is being replicated: - If ClientId is an offline client, then the object is not being replicated by that client. - If ClientId is an online client, then the object(s) may only be registered with the server.

To find out which objects are actually being replicated, use GetReplicatedObjects(), which will always contain GetRegisteredObjects(). see: UMultiUserSubsystem::GetLocalClientId and UMultiUserSubsystem::GetRemoteClientIds

Parameters:

client_id (Guid) – The client of which to get the registered objects.

Returns:

The objects the client has

Return type:

Array[SoftObjectPath]

get_replicated_objects(client_id) Array[SoftObjectPath]

Gets the objects that are currently being replicated by the client. note: There is a difference between registered and replicated objects! Objects are registered with the server first and later the client can attempt to start replicating them. GetReplicatedObjects() will always contain GetRegisteredObjects(). see: UMultiUserSubsystem::GetLocalClientId and UMultiUserSubsystem::GetRemoteClientIds

Parameters:

client_id (Guid) – The client of which to get the replicated objects.

Returns:

The objects being replicated by the client

Return type:

Array[SoftObjectPath]

is_owned_by_offline_client(object_path) bool
Parameters:

object_path (SoftObjectPath)

Returns:

Whether any offline clients will try to register properties for ObjectPath upon rejoining.

Return type:

bool

is_replicating_object(client_id, object_path) bool

note: An object can be registered but not replicated. see: UMultiUserSubsystem::GetLocalClientId and UMultiUserSubsystem::GetRemoteClientIds

Parameters:
Returns:

Whether the client is replicating the object.

Return type:

bool

property on_client_authority_server_state_changed: OnServerStateChanged

[Read-Write] Event triggered a client changes the objects it is replicating.

Type:

(OnServerStateChanged)

property on_client_stream_server_state_changed: OnServerStateChanged

[Read-Write] Event triggered when the following changes about a client: - The registered object to properties bindings - The registered replication frequency setting of an object

Type:

(OnServerStateChanged)

property on_offline_client_content_changed: OnServerStateChanged

[Read-Write] Event triggered when the content that an offline client will attempt to re-claim changes.

Type:

(OnServerStateChanged)

property on_offline_clients_changed: OnOfflineClientsChanged

[Read-Write] Event triggered when the local list of offline clients has changed.

Type:

(OnOfflineClientsChanged)