WebRTCMultiplayerInitialize Method |
Initialize the multiplayer peer with the given peer_id (must be between 1 and 2147483647).
If server_compatibilty is false (default), the multiplayer peer will be immediately in state and NetworkedMultiplayerPeer.connection_succeeded will not be emitted.
If server_compatibilty is true the peer will suppress all NetworkedMultiplayerPeer.peer_connected signals until a peer with id connects and then emit NetworkedMultiplayerPeer.connection_succeeded. After that the signal NetworkedMultiplayerPeer.peer_connected will be emitted for every already connected peer, and any new peer that might connect. If the server peer disconnects after that, signal NetworkedMultiplayerPeer.server_disconnected will be emitted and state will become .
Namespace: Godot
public Error Initialize( int peerId, bool serverCompatibility = false )
[Missing <param name="peerId"/> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]
[Missing <param name="serverCompatibility"/> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]
[Missing <returns> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]