: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/../../GodotApplePlugins/doc_classes/ARCollaborationData.xml. .. _class_ARCollaborationData: ARCollaborationData =================== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Collaboration data for multi-peer AR sessions. .. rst-class:: classref-introduction-group Description ----------- Encapsulates spatial data that can be exchanged between devices for shared AR experiences. Received via the :ref:`ARSession.collaboration_data_received` signal and sent to peers via :ref:`ARSession.update_with_collaboration_data()`. Use :ref:`serialize()` and :ref:`deserialize()` to transmit over a network transport (e.g. MultipeerConnectivity). **iOS 13+ only.** Requires ``isCollaborationEnabled`` on the configuration. On visionOS/macOS, this type exists for API consistency but serialize/deserialize are no-ops. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------+--------------------------------------------------------------+-------+ | :ref:`int` | :ref:`priority` | ``1`` | +-----------------------+--------------------------------------------------------------+-------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARCollaborationData` | :ref:`deserialize`\ (\ data\: :ref:`PackedByteArray`\ ) |static| | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`serialize`\ (\ ) | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ARCollaborationData_Priority: .. rst-class:: classref-enumeration enum **Priority**: :ref:`🔗` .. _class_ARCollaborationData_constant_CRITICAL: .. rst-class:: classref-enumeration-constant :ref:`Priority` **CRITICAL** = ``0`` This packet is essential for accurate shared-session synchronization. .. _class_ARCollaborationData_constant_OPTIONAL: .. rst-class:: classref-enumeration-constant :ref:`Priority` **OPTIONAL** = ``1`` This packet improves shared-session quality but may be dropped if needed. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARCollaborationData_property_priority: .. rst-class:: classref-property :ref:`int` **priority** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_priority**\ (\ ) Indicates whether this collaboration packet is optional or critical to session convergence. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ARCollaborationData_method_deserialize: .. rst-class:: classref-method :ref:`ARCollaborationData` **deserialize**\ (\ data\: :ref:`PackedByteArray`\ ) |static| :ref:`🔗` Creates an **ARCollaborationData** instance from serialized network data. .. rst-class:: classref-item-separator ---- .. _class_ARCollaborationData_method_serialize: .. rst-class:: classref-method :ref:`PackedByteArray` **serialize**\ (\ ) :ref:`🔗` Serializes this collaboration packet into a :ref:`PackedByteArray` so it can be sent to another peer. .. |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.)`