SceneReplicationConfig.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SceneReplicationConfig" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Configuration for properties to synchronize with a [MultiplayerSynchronizer].
  5. </brief_description>
  6. <description>
  7. </description>
  8. <tutorials>
  9. </tutorials>
  10. <methods>
  11. <method name="add_property">
  12. <return type="void" />
  13. <param index="0" name="path" type="NodePath" />
  14. <param index="1" name="index" type="int" default="-1" />
  15. <description>
  16. Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index].
  17. [b]Note:[/b] For details on restrictions and limitations on property synchronization, see [MultiplayerSynchronizer].
  18. </description>
  19. </method>
  20. <method name="get_properties" qualifiers="const">
  21. <return type="NodePath[]" />
  22. <description>
  23. Returns a list of synchronized property [NodePath]s.
  24. </description>
  25. </method>
  26. <method name="has_property" qualifiers="const">
  27. <return type="bool" />
  28. <param index="0" name="path" type="NodePath" />
  29. <description>
  30. Returns whether the given [param path] is configured for synchronization.
  31. </description>
  32. </method>
  33. <method name="property_get_index" qualifiers="const">
  34. <return type="int" />
  35. <param index="0" name="path" type="NodePath" />
  36. <description>
  37. Finds the index of the given [param path].
  38. </description>
  39. </method>
  40. <method name="property_get_replication_mode">
  41. <return type="int" enum="SceneReplicationConfig.ReplicationMode" />
  42. <param index="0" name="path" type="NodePath" />
  43. <description>
  44. Returns the replication mode for the property identified by the given [param path]. See [enum ReplicationMode].
  45. </description>
  46. </method>
  47. <method name="property_get_spawn">
  48. <return type="bool" />
  49. <param index="0" name="path" type="NodePath" />
  50. <description>
  51. Returns whether the property identified by the given [param path] is configured to be synchronized on spawn.
  52. </description>
  53. </method>
  54. <method name="property_get_sync" is_deprecated="true">
  55. <return type="bool" />
  56. <param index="0" name="path" type="NodePath" />
  57. <description>
  58. Returns whether the property identified by the given [param path] is configured to be synchronized on process.
  59. [i]Deprecated.[/i] Use [method property_get_replication_mode] instead.
  60. </description>
  61. </method>
  62. <method name="property_get_watch" is_deprecated="true">
  63. <return type="bool" />
  64. <param index="0" name="path" type="NodePath" />
  65. <description>
  66. Returns whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process.
  67. [i]Deprecated.[/i] Use [method property_get_replication_mode] instead.
  68. </description>
  69. </method>
  70. <method name="property_set_replication_mode">
  71. <return type="void" />
  72. <param index="0" name="path" type="NodePath" />
  73. <param index="1" name="mode" type="int" enum="SceneReplicationConfig.ReplicationMode" />
  74. <description>
  75. Sets the synchronization mode for the property identified by the given [param path]. See [enum ReplicationMode].
  76. </description>
  77. </method>
  78. <method name="property_set_spawn">
  79. <return type="void" />
  80. <param index="0" name="path" type="NodePath" />
  81. <param index="1" name="enabled" type="bool" />
  82. <description>
  83. Sets whether the property identified by the given [param path] is configured to be synchronized on spawn.
  84. </description>
  85. </method>
  86. <method name="property_set_sync" is_deprecated="true">
  87. <return type="void" />
  88. <param index="0" name="path" type="NodePath" />
  89. <param index="1" name="enabled" type="bool" />
  90. <description>
  91. Sets whether the property identified by the given [param path] is configured to be synchronized on process.
  92. [i]Deprecated.[/i] Use [method property_set_replication_mode] with [constant REPLICATION_MODE_ALWAYS] instead.
  93. </description>
  94. </method>
  95. <method name="property_set_watch" is_deprecated="true">
  96. <return type="void" />
  97. <param index="0" name="path" type="NodePath" />
  98. <param index="1" name="enabled" type="bool" />
  99. <description>
  100. Sets whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process.
  101. [i]Deprecated.[/i] Use [method property_set_replication_mode] with [constant REPLICATION_MODE_ON_CHANGE] instead.
  102. </description>
  103. </method>
  104. <method name="remove_property">
  105. <return type="void" />
  106. <param index="0" name="path" type="NodePath" />
  107. <description>
  108. Removes the property identified by the given [param path] from the configuration.
  109. </description>
  110. </method>
  111. </methods>
  112. <constants>
  113. <constant name="REPLICATION_MODE_NEVER" value="0" enum="ReplicationMode">
  114. Do not keep the given property synchronized.
  115. </constant>
  116. <constant name="REPLICATION_MODE_ALWAYS" value="1" enum="ReplicationMode">
  117. Replicate the given property on process by constantly sending updates using unreliable transfer mode.
  118. </constant>
  119. <constant name="REPLICATION_MODE_ON_CHANGE" value="2" enum="ReplicationMode">
  120. Replicate the given property on process by sending updates using reliable transfer mode when its value changes.
  121. </constant>
  122. </constants>
  123. </class>