Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run two game windows in Unity Editor

Tags:

c#

unity3d

unity5

What do I mean by two game windows in the Unity Editor?

Well if one could basically be able to have two separate windows inside the editor instead of being limited to having just one:

Why would this be useful?

It's mostly useful for networking. When testing a networked multiplayer game, normally one would have to wait a long time to create a standalone build to test and debug events, plus debugging errors on standalone is hard.

If I could just run two instances (one server/ one client) on the click of the play button I would save so much time.

This is a game window btw https://i.gyazo.com/2aeb04f8a41f1508d262cf9a526311bc.png

like image 785
Isaak Eriksson Avatar asked Jun 01 '16 18:06

Isaak Eriksson


1 Answers

If you are trying to test networking code, having multiple "game windows" open won't actually allow you to do that. If you have multiple copies of the project on your computer you can open multiple instances of unity. (unity puts a lock file in each project so you can't just open it twice using the same files)

Downside to this is that if you make changes in one project, you have to copy/redo that change in the copy of the project. But certainly faster than building and you can connect debuggers to both instances of unity

like image 68
Colton White Avatar answered Sep 18 '22 01:09

Colton White