Realtime Multiuser Editor Plugin for Unity / by Thomas McGillicuddy

For my final in networking for online games, I'm working with two other students to create a real time multiuser plugin for the Unity Editor. It's goal is to allow multiple developers to interact with the same scene in real time. This is in an effort to take away conflict issues when working on smaller teams and game files are locked or cannot be merged on a repository.  It uses a RakNet framework to manage the networking packets.

The architecture is fairly simple, one instance of Unity runs as a server and manages broadcasts to other Unity instance running as a client. So far we have serialization and serialization running very smoothly, and support for Unity components is coming together nicely. We are working on keeping the system as a whole as efficient as possible. Beyond the technical challenges, the user experience is very important to us, and making the system as intuitive as possible is out main goal.

Lag is something we want to avoid at all costs, and that takes some low-level adjustment to Unity's Editor.  So we have implemented several database features to expedite the process of finding objects in the scene. We use a fairly basic flag on each object that holds data relating to how it is recognized by the system. The flag consists of a unique ID that is auto generated by the plugin, and two boolean flags that state whether an object's state needs to be sent over the network (modified) and the if it is locked because another user is interacting with it. We also are using a hash-map to catalog the objects. The hash-code is generated based on the unique ID that is given to the object's flag, and can thus be consistently converted into the same hash-code no matter what system it is on.