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

How to configure GdSceneSynchronizer in case of two connections? #120

Open
Malkverbena opened this issue Mar 29, 2024 · 3 comments
Open

Comments

@Malkverbena
Copy link

If I have two connections in the same scene, how should I configure GdSceneSynchronizer?
Would I have to have two singletons?

@AndreaCatania
Copy link
Collaborator

Yes, or a single singleton that under the hood instantiates two (or more) different GdSceneSynchronizer.
In such a case the API would look like:

NetSync.sync_layer[0].register_variable(...)

@Malkverbena
Copy link
Author

Malkverbena commented Mar 30, 2024

I guess that multiplayer(property) of GdSceneSynchronizer also must be set, correct?

@AndreaCatania
Copy link
Collaborator

Yes, each GdSceneSynchronizer must have it's own (or shared) MultiplayerAPI set as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants