Click or drag to resize

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
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Error Initialize(
	int peerId,
	bool serverCompatibility = false
)

Parameters

peerId
Type: SystemInt32

[Missing <param name="peerId"/> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]

serverCompatibility (Optional)
Type: SystemBoolean

[Missing <param name="serverCompatibility"/> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]

Return Value

Type: Error

[Missing <returns> documentation for "M:Godot.WebRTCMultiplayer.Initialize(System.Int32,System.Boolean)"]

See Also