network_synchronizer icon indicating copy to clipboard operation
network_synchronizer copied to clipboard

How to configure GdSceneSynchronizer in case of two connections?

Open Malkverbena opened this issue 10 months ago • 3 comments

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

Malkverbena avatar Mar 29 '24 16:03 Malkverbena

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(...)

AndreaCatania avatar Mar 29 '24 17:03 AndreaCatania

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

Malkverbena avatar Mar 30 '24 12:03 Malkverbena

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

AndreaCatania avatar Mar 30 '24 12:03 AndreaCatania