Skip to content

Real-time collaboration using Unity Render Streaming

Real-timecollaboration using Unity Render Streaming in Cities: Skylines

Preface

Unity Render Streaming'is a solution that provides Unity's high-quality rendering abilities via browser. It uses WebRTC'to stream a video over the network to a web browser (can be streamed on some mobile web browsers too). It can also receive input from users watching the stream (input from a Mouse, keyboard, touchpad, or gamepad). The source of the stream can be the game view of the player, or a view from a camera component on any GameObject in the scene. Multiple cameras can be streamed simultaneously with the UI as well.

Implementing a peer-to-peer real-time collaboration system(Mod):

To implement such system, you would need the following:

  • A device to run the game & share the stream (a router configuration might be required)
  • A second device to watch the stream from a browser and send Mouse & keyboard input

The basic idea for the mod is that it will create a second player with a second camera view, replicate the UI and overlay it to the second camera. The game state variables will be shared (such as the cash) because the game is only running on one device.

It might sound simple, but in order to actually create the mod, you would need to:

  1. Understand how the input is handled in the game.
  2. Understand the player prefab and it's functioning components (it might need some modifications).
  3. Create a mapper to map the input from the second device to the second player GameObject.

Conclusion:

In order to implement this Mod, you would need to read and understand the source code of the game and probably modify some of it to get it working. It's not possible without the source code.

Back to top