class_scenereplicationconfig.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/multiplayer/doc_classes/SceneReplicationConfig.xml.
  6. .. _class_SceneReplicationConfig:
  7. SceneReplicationConfig
  8. ======================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Configuration for properties to synchronize with a :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`.
  11. .. rst-class:: classref-reftable-group
  12. Methods
  13. -------
  14. .. table::
  15. :widths: auto
  16. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | |void| | :ref:`add_property<class_SceneReplicationConfig_method_add_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`, index\: :ref:`int<class_int>` = -1\ ) |
  18. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Array<class_Array>`\[:ref:`NodePath<class_NodePath>`\] | :ref:`get_properties<class_SceneReplicationConfig_method_get_properties>`\ (\ ) |const| |
  20. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`has_property<class_SceneReplicationConfig_method_has_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  22. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`property_get_index<class_SceneReplicationConfig_method_property_get_index>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| |
  24. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` | :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  26. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`property_get_spawn<class_SceneReplicationConfig_method_property_get_spawn>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  28. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`property_get_sync<class_SceneReplicationConfig_method_property_get_sync>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  30. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`property_get_watch<class_SceneReplicationConfig_method_property_get_watch>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  32. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | |void| | :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>`\ (\ path\: :ref:`NodePath<class_NodePath>`, mode\: :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`\ ) |
  34. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | |void| | :ref:`property_set_spawn<class_SceneReplicationConfig_method_property_set_spawn>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) |
  36. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | |void| | :ref:`property_set_sync<class_SceneReplicationConfig_method_property_set_sync>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) |
  38. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | |void| | :ref:`property_set_watch<class_SceneReplicationConfig_method_property_set_watch>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) |
  40. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`remove_property<class_SceneReplicationConfig_method_remove_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |
  42. +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Enumerations
  47. ------------
  48. .. _enum_SceneReplicationConfig_ReplicationMode:
  49. .. rst-class:: classref-enumeration
  50. enum **ReplicationMode**: :ref:`🔗<enum_SceneReplicationConfig_ReplicationMode>`
  51. .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_NEVER:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_NEVER** = ``0``
  54. Do not keep the given property synchronized.
  55. .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_ALWAYS** = ``1``
  58. Replicate the given property on process by constantly sending updates using unreliable transfer mode.
  59. .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE:
  60. .. rst-class:: classref-enumeration-constant
  61. :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_ON_CHANGE** = ``2``
  62. Replicate the given property on process by sending updates using reliable transfer mode when its value changes.
  63. .. rst-class:: classref-section-separator
  64. ----
  65. .. rst-class:: classref-descriptions-group
  66. Method Descriptions
  67. -------------------
  68. .. _class_SceneReplicationConfig_method_add_property:
  69. .. rst-class:: classref-method
  70. |void| **add_property**\ (\ path\: :ref:`NodePath<class_NodePath>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_SceneReplicationConfig_method_add_property>`
  71. Adds the property identified by the given ``path`` to the list of the properties being synchronized, optionally passing an ``index``.
  72. \ **Note:** For details on restrictions and limitations on property synchronization, see :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_SceneReplicationConfig_method_get_properties:
  76. .. rst-class:: classref-method
  77. :ref:`Array<class_Array>`\[:ref:`NodePath<class_NodePath>`\] **get_properties**\ (\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_get_properties>`
  78. Returns a list of synchronized property :ref:`NodePath<class_NodePath>`\ s.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_SceneReplicationConfig_method_has_property:
  82. .. rst-class:: classref-method
  83. :ref:`bool<class_bool>` **has_property**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_has_property>`
  84. Returns ``true`` if the given ``path`` is configured for synchronization.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_SceneReplicationConfig_method_property_get_index:
  88. .. rst-class:: classref-method
  89. :ref:`int<class_int>` **property_get_index**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_property_get_index>`
  90. Finds the index of the given ``path``.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_SceneReplicationConfig_method_property_get_replication_mode:
  94. .. rst-class:: classref-method
  95. :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **property_get_replication_mode**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_replication_mode>`
  96. Returns the replication mode for the property identified by the given ``path``. See :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_SceneReplicationConfig_method_property_get_spawn:
  100. .. rst-class:: classref-method
  101. :ref:`bool<class_bool>` **property_get_spawn**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_spawn>`
  102. Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on spawn.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_SceneReplicationConfig_method_property_get_sync:
  106. .. rst-class:: classref-method
  107. :ref:`bool<class_bool>` **property_get_sync**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_sync>`
  108. **Deprecated:** Use :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>` instead.
  109. Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on process.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_SceneReplicationConfig_method_property_get_watch:
  113. .. rst-class:: classref-method
  114. :ref:`bool<class_bool>` **property_get_watch**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_watch>`
  115. **Deprecated:** Use :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>` instead.
  116. Returns ``true`` if the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process.
  117. .. rst-class:: classref-item-separator
  118. ----
  119. .. _class_SceneReplicationConfig_method_property_set_replication_mode:
  120. .. rst-class:: classref-method
  121. |void| **property_set_replication_mode**\ (\ path\: :ref:`NodePath<class_NodePath>`, mode\: :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_replication_mode>`
  122. Sets the synchronization mode for the property identified by the given ``path``. See :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_SceneReplicationConfig_method_property_set_spawn:
  126. .. rst-class:: classref-method
  127. |void| **property_set_spawn**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_spawn>`
  128. Sets whether the property identified by the given ``path`` is configured to be synchronized on spawn.
  129. .. rst-class:: classref-item-separator
  130. ----
  131. .. _class_SceneReplicationConfig_method_property_set_sync:
  132. .. rst-class:: classref-method
  133. |void| **property_set_sync**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_sync>`
  134. **Deprecated:** Use :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>` with :ref:`REPLICATION_MODE_ALWAYS<class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS>` instead.
  135. Sets whether the property identified by the given ``path`` is configured to be synchronized on process.
  136. .. rst-class:: classref-item-separator
  137. ----
  138. .. _class_SceneReplicationConfig_method_property_set_watch:
  139. .. rst-class:: classref-method
  140. |void| **property_set_watch**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_watch>`
  141. **Deprecated:** Use :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>` with :ref:`REPLICATION_MODE_ON_CHANGE<class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE>` instead.
  142. Sets whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_SceneReplicationConfig_method_remove_property:
  146. .. rst-class:: classref-method
  147. |void| **remove_property**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_remove_property>`
  148. Removes the property identified by the given ``path`` from the configuration.
  149. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  150. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  151. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  152. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  153. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  154. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  155. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  156. .. |void| replace:: :abbr:`void (No return value.)`