Hello everyone!
I have a problem getting a MultiplayerSpawner to spawn a player object on the client. Both client and server use the same main scene. The server loads two world scenes on startup wrapped in SubViewport nodes so that I can each assign a World3D and have separate physics. The world scenes contain the MultiplayerSpawner nodes and have each their own MultiplayerAPI instance.
The client will load one of the levels and only after it's loaded it will establish the connection to the respective scenes MultiplayerPeer. The server correctly creates the player object after the connection and obviously tries to sync it to the client, but on the client I get the MultiplayerSpawner error messages:
E 0:08:42:0829 get_node: Node not found: "MultiplayerSpawner" (relative to "/root").
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1626 @ get_node()
E 0:08:42:0829 process_simplify_path: Condition "node == nullptr" is true.
<C++ Source> modules/multiplayer/scene_cache_interface.cpp:77 @ process_simplify_path()
E 0:08:42:0829 get_cached_object: ID 1 not found in cache of peer 1.
<C++ Error> Condition "!F" is true. Returning: nullptr
<C++ Source> modules/multiplayer/scene_cache_interface.cpp:241 @ get_cached_object()
E 0:08:42:0829 on_spawn_receive: Condition "!spawner" is true. Returning: ERR_DOES_NOT_EXIST
<C++ Source> modules/multiplayer/scene_replication_interface.cpp:571 @ on_spawn_receive()
I am using Godot 4.1.2.
This is how the server tree looks like before the connection:
This is the server tree after the connection with the spawned player:
And finally the client tree after the connection:
Any hints for workarounds for this issue or problems with my scene setup would be greatly appreciated.
Best regards,
Patrick