summaryrefslogtreecommitdiff
path: root/doc/classes/MultiplayerPeer.xml
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-16 00:43:49 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-29 10:40:03 +0200
commit1e8bf86379ca818bf7208de5f04f986be95dc102 (patch)
tree58e22020da59410beec75c4b07ef85dfd95f4c4f /doc/classes/MultiplayerPeer.xml
parent4cfa9bc0f1ef1d584705f36d70ee7f4d37a02b8c (diff)
[Net] Add generate_unique_id to MultiplayerPeer.
Used by ENetMultiplayerPeer and WebSocketServer to generate network IDs, and exposed to the user for p2p networks (e.g. WebRTCMultiplayerPeer) and custom MultiplayerPeer implementations.
Diffstat (limited to 'doc/classes/MultiplayerPeer.xml')
-rw-r--r--doc/classes/MultiplayerPeer.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 713cd64b82..fa8f0e2de9 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -12,6 +12,13 @@
<link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
+ <method name="generate_unique_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns a randomly generated integer that can be used as a network unique ID.
+ </description>
+ </method>
<method name="get_connection_status" qualifiers="const">
<return type="int" enum="MultiplayerPeer.ConnectionStatus">
</return>