mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Document requirement of having client + server RPCs in High-level multiplayer (#7932)
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
committed by
GitHub
parent
ead42d79de
commit
7e573eae55
@@ -196,6 +196,16 @@ For a remote call to be successful, the sending and receiving node need to have
|
|||||||
must have the same name. When using ``add_child()`` for nodes which are expected to use RPCs, set the argument
|
must have the same name. When using ``add_child()`` for nodes which are expected to use RPCs, set the argument
|
||||||
``force_readable_name`` to ``true``.
|
``force_readable_name`` to ``true``.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
If a function is annotated with ``@rpc`` on the client script (resp. server script),
|
||||||
|
then this function must also be declared on the server script (resp. client script),
|
||||||
|
and both must have the same signature, **even if this function is not currently used**.
|
||||||
|
|
||||||
|
If these conditions are not fulfilled, the script may print an error or
|
||||||
|
cause unwanted behavior. See further explanation and troubleshooting on
|
||||||
|
`this post <https://github.com/godotengine/godot/issues/57869#issuecomment-1034215138>`__.
|
||||||
|
|
||||||
The annotation can take a number of arguments, which have default values. ``@rpc`` is equivalent to:
|
The annotation can take a number of arguments, which have default values. ``@rpc`` is equivalent to:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|||||||
Reference in New Issue
Block a user