Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiplayerReplicator does not properly sync scene inside other scene #55734

Closed
nathanfranke opened this issue Dec 8, 2021 · 2 comments
Closed

Comments

@nathanfranke
Copy link
Contributor

nathanfranke commented Dec 8, 2021

Godot version

v4.0.dev.custom_build [04fac59]

System information

Linux x86_64 on 5.15.6-zen2-1-zen

Issue description

I am working on an RTS game which syncs the Map scenes. However, the Map scenes may also have Player nodes as children (e.g. bots or premade players). When the server instantiates a Map scene, the Player children are also automatically spawned, which triggers another spawn call on the client, leading to this problem.

The subscenes also don't sync their properties, as can be seen in the MRP

Scene Layout, SyncMain as root and SyncSub as a child

Server:

Synced string: Hello World!
Synced string: Hello World!
Synced string: Hello World!
Synced string: Hello World!
Synced string: Hello World!

Client:

ERROR: Unable to spawn node. Node already exists: /root/Scene/SyncMain/SyncSub
   at: _process_default_spawn_despawn (core/multiplayer/multiplayer_replicator.cpp:267)
Synced string: Default
Synced string: Default
Synced string: Default
Synced string: Default
Synced string: Default

Steps to reproduce

  1. Run MRP with --server
  2. Run MRP at the same time without any arguments

Minimal reproduction project

Test14.zip

@Calinou Calinou added this to the 4.0 milestone Dec 8, 2021
@Faless
Copy link
Collaborator

Faless commented Dec 8, 2021

Thanks, this is currently expected but will be fixed with the new MultiplayerSpanwer node.

@Faless
Copy link
Collaborator

Faless commented Mar 27, 2022

Closing, as this should now be possible with the new API (which can be configured to not spawn nodes automatically).

@Faless Faless closed this as completed Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants