diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 0a323d5c8e0..4e0ba53f482 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -22262,8 +22262,10 @@ + PacketPeer implementation using the ENet library. + A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals. @@ -22618,6 +22620,7 @@ Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it. To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children. + [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use it's [NodePath] (make sure node names are the same on all peers). @@ -23055,6 +23058,7 @@ + Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath]. @@ -23063,6 +23067,7 @@ + Change the method's RPC mode (one of RPC_MODE_* constants). @@ -23071,12 +23076,14 @@ + Send a [method rpc] to a specific peer identified by [i]peer_id[/i]. + Send a [method rpc] using an unreliable protocol. @@ -23085,6 +23092,7 @@ + Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol. @@ -23093,6 +23101,7 @@ + Remotely change property's value on other peers (and locally). @@ -23101,6 +23110,7 @@ + Change the property's RPC mode (one of RPC_MODE_* constants). @@ -23111,6 +23121,7 @@ + Remotely change property's value on a specific peer identified by [i]peer_id[/i]. @@ -23119,6 +23130,7 @@ + Remotely change property's value on other peers (and locally) using an unreliable protocol. @@ -23129,6 +23141,7 @@ + Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol. @@ -23162,6 +23175,7 @@ + Change the networking mode of the [Node], where [i]mode[/i] is one of the constants NETWORK_MODE_*. Master nodes will only call gdscript methods defined as [i]master func[/i] if a RPC call is received (slave nodes will only call [i]slave func[/i]; both will call [i]remote func[/i] if the call is not local, and [i]sync func[/i] in any case). Inherit mode looks at the parent node to determine the value (root node depends on the [SceneTree] having a networking peer set with [method SceneTree.set_network_peer]) @@ -35261,6 +35275,7 @@ + Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections). @@ -35357,6 +35372,7 @@ + Set the peer object to handle the RPC system (effectively enabling networking). 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.