Class reference
SceneReplicationConfig
Inherits Resource
Configuration for properties to synchronize with a MultiplayerSynchronizer.
Methods
void add_property(NodePath path, int index = -1)
NodePath path, int index = -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.
NodePath[] get_properties() const
Returns a list of synchronized property NodePaths.
bool has_property(NodePath path) const
bool has_property(NodePath path) constReturns true if the given path is configured for synchronization.
int property_get_index(NodePath path) const
int property_get_index(NodePath path) constFinds the index of the given path.
int property_get_precision(NodePath path)
int property_get_precision(NodePath path)Returns the wire precision used for the property identified by the given path. See ReplicationPrecision.
int property_get_replication_mode(NodePath path)
int property_get_replication_mode(NodePath path)Returns the replication mode for the property identified by the given path.
bool property_get_spawn(NodePath path)
bool property_get_spawn(NodePath path)Returns true if the property identified by the given path is configured to be synchronized on spawn.
bool property_get_sync(NodePath path)
bool property_get_sync(NodePath path)Use property_get_replication_mode() instead.
Returns true if the property identified by the given path is configured to be synchronized on process.
bool property_get_watch(NodePath path)
bool property_get_watch(NodePath path)Use property_get_replication_mode() instead.
Returns true if the property identified by the given path is configured to be reliably synchronized when changes are detected on process.
void property_set_precision(NodePath path, int precision)
NodePath path, int precision)Sets the wire precision used for the property identified by the given path. See ReplicationPrecision. Both peers must use the same configuration.
void property_set_replication_mode(NodePath path, int mode)
NodePath path, int mode)Sets the synchronization mode for the property identified by the given path.
void property_set_spawn(NodePath path, bool enabled)
NodePath path, bool enabled)Sets whether the property identified by the given path is configured to be synchronized on spawn.
void property_set_sync(NodePath path, bool enabled)
NodePath path, bool enabled)Use property_set_replication_mode() with REPLICATION_MODE_ALWAYS instead.
Sets whether the property identified by the given path is configured to be synchronized on process.
void property_set_watch(NodePath path, bool enabled)
NodePath path, bool enabled)Use property_set_replication_mode() with REPLICATION_MODE_ON_CHANGE instead.
Sets whether the property identified by the given path is configured to be reliably synchronized when changes are detected on process.
void remove_property(NodePath path)
NodePath path)Removes the property identified by the given path from the configuration.
Constants
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.
PRECISION_FULL = 0
Replicate the given property at full precision using the standard variant encoding. This is the default.
PRECISION_HALF = 1
Replicate the given property using half-precision (16-bit) floats to save bandwidth. Applies to float, Vector2, Vector3, Vector4, Quaternion and Color; other types fall back to full precision. Reduces range and precision, so it is best suited to values that tolerate small errors (positions on modest maps, velocities, rotations, colors). Both peers must use the same configuration.