Possible use cases for multiple bridges.

Hi. I’m new to Coherence and learning from the document trying this and that.

One thing I’m curious about is,
I see that multiple bridges can be placed in a scene, which means connecting to multiple replication services. In which cases would we need that?

I found one case from the multi-room simulator’s view, as shown in https://www.youtube.com/watch?v=RFCtb4G7Q2k. But other than that, when would we need that as a client?

1 Like

Hi Bohyun! And welcome to the forums and more in general, to coherence. Also thanks for taking the time to bring your question here, we really appreciate it!

Now. As far as I know (and I can see from that video), we don’t have a use case for multiple CoherenceBridge in the same scene. In the video you can see a ton of coherence objects in each scene, but only one of them is a Bridge. For the rest, there are multiple Bridges but each one in its own scene.

That’s in fact the principle behind the Multi-room Simulator: each scene represents a match or a game, and for that, one Unity instance that acts as the Simulator Server uses a Bridge for each scene/match to manage all the connections separately. Each Bridge “watches over” a scene, and handles its network entities and their changes.

More info on the Multi-room Simulator setup.

In a regular game client, there would be little use for this setup. Normally you only have one Bridge per scene, but only one Bridge is marked as the “Main Bridge” and it usually gets placed in the DontDestroyOnLoad scene. When you move from scene to scene, if a new scene has a new Bridge, this new Bridge deactivates itself and passes control to the one in DontDestroyOnLoad.

This multi-scene workflow is described here

I hope this clarifies it somehow. Just two different workflows for different use cases.

1 Like

Thank you, Ciro. Your comment helped me to understand the concepts clearly.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.