godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.14k stars 21.19k forks source link

MultiplayerSynchronizer not working #64053

Closed colin-h closed 2 years ago

colin-h commented 2 years ago

Godot version

4.0.alpha13

System information

MacOs

Issue description

When adding a MultiplayerSynchronizer node to my CharacterScene I expect the default configuration to work. By "work" here I mean successfully send packets to the server on the other end of the wire.

Instead, when I create a new character node, the synchronizer attempts to send a packet but throws the following error:

ERROR: Condition "!sync || !sync->get_replication_config().is_valid()" is true. Continuing.
   at: _send_sync (scene/multiplayer/scene_replication_interface.cpp:444)

I found that if I uncheck the "Public Visiblity" checkbox. The error message disappears... however it does not seem that the spawn packets get to the clients.

Screen Shot 2022-08-07 at 8 29 36 AM

Steps to reproduce

  1. Run a headless server instance of the repro project. <path_to_godot> --path <path_to_project> --server --headless
  2. Run a client instance of the project using the Editor or the following command: <path_to_godot> --path <path_to_project>
  3. See error appear in server terminal Screen Shot 2022-08-07 at 8 33 42 AM

    .

Minimal reproduction project

sync_bug.zip

jgillich commented 2 years ago

Your replication config is empty, you need to add the property. Once I do, this works fine. Screenshot from 2022-08-09 12-25-55

If the replication window doesn't open try a master build, it's bugged in alpha13

colin-h commented 2 years ago

Just a ui bug in alpha 13

alexeocto commented 1 year ago

Your replication config is empty, you need to add the property. Once I do, this works fine. Screenshot from 2022-08-09 12-25-55

If the replication window doesn't open try a master build, it's bugged in alpha13

took me hours to spot that thing. I don't see it mentioned at all on the docs. this saved me.