: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/GKTurnBasedMatchmakerViewController.xml. .. _class_GKTurnBasedMatchmakerViewController: GKTurnBasedMatchmakerViewController =================================== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Presents Apple's turn-based matchmaking UI. .. rst-class:: classref-introduction-group Description ----------- Wrapper around ``GKTurnBasedMatchmakerViewController``. Use :ref:`create_controller()` when you want to keep the controller instance and listen to its signals, or :ref:`request_match()` for a one-shot request/callback flow. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------+--------------------------------------------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`matchmaking_mode` | ``0`` | +-------------------------+--------------------------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`show_existing_matches` | ``true`` | +-------------------------+--------------------------------------------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GKTurnBasedMatchmakerViewController` | :ref:`create_controller`\ (\ request\: :ref:`GKMatchRequest`\ ) |static| | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`present`\ (\ ) | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`request_match`\ (\ request\: :ref:`GKMatchRequest`, callback\: :ref:`Callable`\ ) |static| | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_GKTurnBasedMatchmakerViewController_signal_cancelled: .. rst-class:: classref-signal **cancelled**\ (\ detail\: :ref:`String`\ ) :ref:`🔗` Emitted when the matchmaking UI is canceled. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_signal_did_find_match: .. rst-class:: classref-signal **did_find_match**\ (\ match\: :ref:`GKTurnBasedMatch`\ ) :ref:`🔗` Emitted when a turn-based match is found. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_signal_failed_with_error: .. rst-class:: classref-signal **failed_with_error**\ (\ message\: :ref:`String`\ ) :ref:`🔗` Emitted when matchmaking fails with an error message. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_signal_player_quit_for_match: .. rst-class:: classref-signal **player_quit_for_match**\ (\ match\: :ref:`GKTurnBasedMatch`\ ) :ref:`🔗` Emitted when a player quits the specified turn-based match from the matchmaking UI flow. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GKTurnBasedMatchmakerViewController_MatchmakingMode: .. rst-class:: classref-enumeration enum **MatchmakingMode**: :ref:`🔗` .. _class_GKTurnBasedMatchmakerViewController_constant_DEFAULT: .. rst-class:: classref-enumeration-constant :ref:`MatchmakingMode` **DEFAULT** = ``0`` Use Apple's default turn-based matchmaking behavior. .. _class_GKTurnBasedMatchmakerViewController_constant_NEARBY_ONLY: .. rst-class:: classref-enumeration-constant :ref:`MatchmakingMode` **NEARBY_ONLY** = ``1`` Restrict matchmaking to nearby players. .. _class_GKTurnBasedMatchmakerViewController_constant_AUTOMATCH_ONLY: .. rst-class:: classref-enumeration-constant :ref:`MatchmakingMode` **AUTOMATCH_ONLY** = ``2`` Restrict to automatch players only. .. _class_GKTurnBasedMatchmakerViewController_constant_INVITE_ONLY: .. rst-class:: classref-enumeration-constant :ref:`MatchmakingMode` **INVITE_ONLY** = ``3`` Restrict to invited players only. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GKTurnBasedMatchmakerViewController_property_matchmaking_mode: .. rst-class:: classref-property :ref:`int` **matchmaking_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_matchmaking_mode**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_matchmaking_mode**\ (\ ) Controls how players are matched. See :ref:`MatchmakingMode`. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_property_show_existing_matches: .. rst-class:: classref-property :ref:`bool` **show_existing_matches** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_show_existing_matches**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_show_existing_matches**\ (\ ) If ``true``, the UI can show the player's existing turn-based matches. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GKTurnBasedMatchmakerViewController_method_create_controller: .. rst-class:: classref-method :ref:`GKTurnBasedMatchmakerViewController` **create_controller**\ (\ request\: :ref:`GKMatchRequest`\ ) |static| :ref:`🔗` Creates a controller for the provided :ref:`GKMatchRequest`. Call :ref:`present()` to show it and connect to signals such as :ref:`did_find_match` and :ref:`failed_with_error`. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_method_present: .. rst-class:: classref-method |void| **present**\ (\ ) :ref:`🔗` Presents this controller's matchmaking UI. .. rst-class:: classref-item-separator ---- .. _class_GKTurnBasedMatchmakerViewController_method_request_match: .. rst-class:: classref-method |void| **request_match**\ (\ request\: :ref:`GKMatchRequest`, callback\: :ref:`Callable`\ ) |static| :ref:`🔗` Shows turn-based matchmaking UI and returns the result through ``callback``. The callback receives ``(GKTurnBasedMatch match, Variant error)``. On failure or cancel, ``match`` is ``null`` and ``error`` contains a ``GKError``. .. |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.)`