Testing multiplayer without building

Is there a button to auto spawn multiple instances? Splitscreen? Multiple windows spread automatically? Callbacks to auto-join clients to server/run custom scripts? eg replays
It’s really really slow to do builds every time (and all the clicks and dragging to actually test)

ps I know you can do a build, but that is cumbersome and defeats the point of Unity’s quick(ish) iteration time.

2 Likes

What we’re doing currently (for running test scenes in which we try out prediction algorithms and such) is running both a client and a server in the same scene, in the editor. Client and Server objects are on separate layers so they don’t interact with each other physically. Client connects to server on 127.0.0.1 using ConnectWithSimulator. We have some rudimentary code that lets us toggle whether we see things from the client or the server’s perspective.

I’m not at all sure it will scale all that well to testing full game setups, but it’s something.

1 Like

Thanks, yeah that’s possible, hmm. Are you using the new UNET stuff?
My thought is to use version control to sync multiple separate Unity editors (local computer or lan). Which would actually be quicker than doing a build and gets you debugging in a real editor. But it’s still silly to have to do this really. Dare I mention it, but Unreal has this type of thing and it’s very well implemented and I’ve heard that Unity actually internally spawns a separately running instance of the game anyway)
The old hack plugin that the uLink guys made worked great (just manually synced one folder to another separate project folder, so you could run two Unitys), but they don’t support it anymore… actually… I wonder if any old folder sync utility would do the same? I’ll have to try that.

ps (Love Volo, I’m ‘Octamed’ on YouTube)

1 Like

I made a small tool for this

But it’s currently very unpolished and possibly buggy.

What we did for uLink can be done manually as well.
see this

2 Likes

This is actually pretty neat, thanks.

Is there a way to automatically reload changes? At the moment I have to click the reload button manually.

Okay it only needs to reload the editor if you try to change a scene that is active in both editors. A small workaround is to create an offline scene that loads the online scene. I am currently writing a tool that will make the dev experience much nicer.

Actually we wrote a small tool before uLink’s uEcho which was doing the linking automatically but it required admin privileges.
About scene reloading, there are other drawgbacks as well specially if you have 3 editors (one can be lobby or a third client).
you should focus once all editors to compile scripts if scripts are many and take time to compile because when it takes time when you press play it might accur before detecting all scripts and then some instances might run the old code.

I wanted to write a tool for it as well so maybe we can collaborate.

This is great. A few good options. Thanks.

The question now needs to be asked… why exactly can’t multiple Unity editors load the same actual project folder? There doesn’t need to be much real trouble with this, seeing how symbolic links works. @Unity?

Yes I wish there was a really good solution for this, its a real pain having to build an exe for server or client just to test a tiny little change, I think it will burn out my hard drive compiling hundreds of times a day.

And, it waste so much time waiting for a compile. My project consists of 6 G bytes of assets scripts and other junk so it takes a really long time to compile, and the editor keeps stalling every time I change a little thing it keeps automatically updating and freezing while doing it.

Its also difficult debugging from an exe file, you cant see the objects that are instantiated, their properties, parents where they are in the scene or change them during run time like you can do in the editor.

hey, I couldn’t find where to pm you but anyway I would like to sign up for the virtual audio plugin. did you stop working on it? -sam

This is pretty brilliant, heh. I’m gonna try this by sync’ing code with GIT. Using photon for networking. Wish me luck!