diff options
| author | Fabio Alessandrelli | 2018-06-02 14:32:30 +0200 |
|---|---|---|
| committer | Fabio Alessandrelli | 2018-06-03 18:58:04 +0200 |
| commit | 348725dfe0685a5467b91928929385ffe9ab98b7 (patch) | |
| tree | fe9faed6bbe088bec6f410587e751af0c8ffa974 /doc/classes/SceneTree.xml | |
| parent | 8684b631182dffebba27bdf538129818321d0d7d (diff) | |
| download | godot-348725dfe0685a5467b91928929385ffe9ab98b7.tar.gz godot-348725dfe0685a5467b91928929385ffe9ab98b7.tar.zst godot-348725dfe0685a5467b91928929385ffe9ab98b7.zip | |
Add option to disable automatic multiplayer poll
Automatic poll from SceneTree is enabled by default.
This allows for polling (and thus RPCs/RSETs) manually in other loops
(e.g. physics, thread, specific step) and for proper mutex protecion
when accessing the multiplayer API from threads (e.g. for sending larger
files in chunks).
Diffstat (limited to 'doc/classes/SceneTree.xml')
| -rw-r--r-- | doc/classes/SceneTree.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index b2cde861c..7c8feae5b 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -269,6 +269,10 @@ <member name="multiplayer" type="MultiplayerAPI" setter="set_multiplayer" getter="get_multiplayer"> The default [MultiplayerAPI] instance for this SceneTree. </member> + <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled"> + If [code]true[/code] (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. + When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protecion when accessing the [MultiplayerAPI] from threads. + </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. </member> |
