How to run two game windows in Unity Editor

12,317

Solution 1

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

Solution 2

You can create multiple directories and link "Assets", "Packages" and "ProjectSettings" from the origin to your copies. then all your changes are applied to all instances.

on windows: "mklink /d target source" on mac: "ln -s source target"

you still have to apply a few settings in each instance ( like selected platform )

PS: make sure you modify your unique identifier in each copy instance to be able to act as different user/account. this should editor only and can help switch accounts to test different right/behavior

Share:
12,317
Isaak Eriksson
Author by

Isaak Eriksson

Updated on June 07, 2022

Comments

  • Isaak Eriksson
    Isaak Eriksson almost 2 years

    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