Efficient Network Development Workflow

How do people configure their workflow for rapid development of Networking code?

Pre-Unity, we would have two versions of Visual Studio open - referencing the same code/project - and boot up two or more game instances (they could even run on the same PC if the code were written correctly).

However, we cannot do this in Unity since only version of the Editor can be open at a time.

A few imperfect solutions come to mind:

  1. Run Unity on two PCs, sync code back and forth using source control.
  2. Run Unity on two PCs, sharing a mapped drive. However, I’m not sure this would work due to both instances sharing a Library directory.

However, I believe both the above would require to Unity Pro licenses, making it impractical cost-wise.

It seems like the only supported option is to Build an exported version of the game and copy to a 2nd PC. This seems very slow to me.

Does anyone have a better workflow? I would like seconds between modifying code and baing into the game again, ideally on a single PC.

Any ideas?

Go to player settings, check play in background, and build the project and run in the background. You can then start testing by connecting to whatever your running on the editor with the built project.

You can start multiple instances of the UnityEditor, just pass the -projectPath parameter when you start the editor. What you can’t do is open the same project multiple times since the editor will create lock files to prevent corruption of scenes / library folder. You can however copy the entire project to another folder and open this one. This could be done with a batch file which creates a duplicate of the folder and starts the unity editor two times with the two projects. You would have only one master project.

I prefer to create a build and use it as client. You can even change things in the editor and still use an “old” client as long as you don’t implemented or changed anything that would break syncing.

I remember when we had our game on kongregate with only one level, no level selection. We did some testing in the editor with a new second level and someone just joined into our game. Everything works, but he was in a totally different level :slight_smile: it was crazy. Since then i always include a “development server” flag which blocks any build clients from joining.