Skip to content

SceneReplicationConfig

Inherits: Resource < RefCounted < Object

Configuration for properties to synchronize with a MultiplayerSynchronizer.

Returns Method
void add_property(path: EntityPath, index: int = -1)
Array[EntityPath] get_properties() const
bool has_property(path: EntityPath) const
int property_get_index(path: EntityPath) const
ReplicationMode property_get_replication_mode(path: EntityPath)
bool property_get_spawn(path: EntityPath)
void property_set_replication_mode(path: EntityPath, mode: ReplicationMode)
void property_set_spawn(path: EntityPath, enabled: bool)
void remove_property(path: EntityPath)

ReplicationMode

enum ReplicationMode

REPLICATION_MODE_NEVER = 0

Do not keep the given property synchronized.

REPLICATION_MODE_ALWAYS = 1

Replicate the given property on process by constantly sending updates using unreliable transfer mode.

REPLICATION_MODE_ON_CHANGE = 2

Replicate the given property on process by sending updates using reliable transfer mode when its value changes.

add_property

void add_property(path: EntityPath, index: int = -1)

Adds the property identified by the given path to the list of the properties being synchronized, optionally passing an index.

Note: For details on restrictions and limitations on property synchronization, see MultiplayerSynchronizer.

get_properties

Array[EntityPath] get_properties() const

Returns a list of synchronized property EntityPaths.

has_property

bool has_property(path: EntityPath) const

Returns true if the given path is configured for synchronization.

property_get_index

int property_get_index(path: EntityPath) const

Finds the index of the given path.

property_get_replication_mode

ReplicationMode property_get_replication_mode(path: EntityPath)

Returns the replication mode for the property identified by the given path.

property_get_spawn

bool property_get_spawn(path: EntityPath)

Returns true if the property identified by the given path is configured to be synchronized on spawn.

property_set_replication_mode

void property_set_replication_mode(path: EntityPath, mode: ReplicationMode)

Sets the synchronization mode for the property identified by the given path.

property_set_spawn

void property_set_spawn(path: EntityPath, enabled: bool)

Sets whether the property identified by the given path is configured to be synchronized on spawn.

remove_property

void remove_property(path: EntityPath)

Removes the property identified by the given path from the configuration.