:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/modules/multiplayer/doc_classes/SceneReplicationConfig.xml. .. _class_SceneReplicationConfig: SceneReplicationConfig ====================== **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Configuration for properties to synchronize with a :ref:`MultiplayerSynchronizer`. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_property`\ (\ path\: :ref:`NodePath`, index\: :ref:`int` = -1\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`NodePath`\] | :ref:`get_properties`\ (\ ) |const| | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_property`\ (\ path\: :ref:`NodePath`\ ) |const| | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`property_get_index`\ (\ path\: :ref:`NodePath`\ ) |const| | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ReplicationMode` | :ref:`property_get_replication_mode`\ (\ path\: :ref:`NodePath`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_get_spawn`\ (\ path\: :ref:`NodePath`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_get_sync`\ (\ path\: :ref:`NodePath`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_get_watch`\ (\ path\: :ref:`NodePath`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`property_set_replication_mode`\ (\ path\: :ref:`NodePath`, mode\: :ref:`ReplicationMode`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`property_set_spawn`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`property_set_sync`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`property_set_watch`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_property`\ (\ path\: :ref:`NodePath`\ ) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SceneReplicationConfig_ReplicationMode: .. rst-class:: classref-enumeration enum **ReplicationMode**: :ref:`🔗` .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_NEVER: .. rst-class:: classref-enumeration-constant :ref:`ReplicationMode` **REPLICATION_MODE_NEVER** = ``0`` Do not keep the given property synchronized. .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS: .. rst-class:: classref-enumeration-constant :ref:`ReplicationMode` **REPLICATION_MODE_ALWAYS** = ``1`` Replicate the given property on process by constantly sending updates using unreliable transfer mode. .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE: .. rst-class:: classref-enumeration-constant :ref:`ReplicationMode` **REPLICATION_MODE_ON_CHANGE** = ``2`` Replicate the given property on process by sending updates using reliable transfer mode when its value changes. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SceneReplicationConfig_method_add_property: .. rst-class:: classref-method |void| **add_property**\ (\ path\: :ref:`NodePath`, index\: :ref:`int` = -1\ ) :ref:`🔗` 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 :ref:`MultiplayerSynchronizer`. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_get_properties: .. rst-class:: classref-method :ref:`Array`\[:ref:`NodePath`\] **get_properties**\ (\ ) |const| :ref:`🔗` Returns a list of synchronized property :ref:`NodePath`\ s. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_has_property: .. rst-class:: classref-method :ref:`bool` **has_property**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`🔗` Returns ``true`` if the given ``path`` is configured for synchronization. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_get_index: .. rst-class:: classref-method :ref:`int` **property_get_index**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`🔗` Finds the index of the given ``path``. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_get_replication_mode: .. rst-class:: classref-method :ref:`ReplicationMode` **property_get_replication_mode**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` Returns the replication mode for the property identified by the given ``path``. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_get_spawn: .. rst-class:: classref-method :ref:`bool` **property_get_spawn**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on spawn. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_get_sync: .. rst-class:: classref-method :ref:`bool` **property_get_sync**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` **Deprecated:** Use :ref:`property_get_replication_mode()` instead. Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on process. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_get_watch: .. rst-class:: classref-method :ref:`bool` **property_get_watch**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` **Deprecated:** Use :ref:`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. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_set_replication_mode: .. rst-class:: classref-method |void| **property_set_replication_mode**\ (\ path\: :ref:`NodePath`, mode\: :ref:`ReplicationMode`\ ) :ref:`🔗` Sets the synchronization mode for the property identified by the given ``path``. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_set_spawn: .. rst-class:: classref-method |void| **property_set_spawn**\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) :ref:`🔗` Sets whether the property identified by the given ``path`` is configured to be synchronized on spawn. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_set_sync: .. rst-class:: classref-method |void| **property_set_sync**\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) :ref:`🔗` **Deprecated:** Use :ref:`property_set_replication_mode()` with :ref:`REPLICATION_MODE_ALWAYS` instead. Sets whether the property identified by the given ``path`` is configured to be synchronized on process. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_property_set_watch: .. rst-class:: classref-method |void| **property_set_watch**\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) :ref:`🔗` **Deprecated:** Use :ref:`property_set_replication_mode()` with :ref:`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. .. rst-class:: classref-item-separator ---- .. _class_SceneReplicationConfig_method_remove_property: .. rst-class:: classref-method |void| **remove_property**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` Removes the property identified by the given ``path`` from the configuration. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`