Here’s how I open two instances of unity on the same project
There are numerous times that I’ve wanted to compare two scenes in the same unity project. Unfortunately, Unity doesn’t allow an already open Unity project to be opened again. However, I found a hack that lets me open the same project more than once. So let’s open an elevated Windows Powershell and get started.
- Close all instances of Unity, Visual Studio, MonoDevelop, etc.
- Open an elevated Powershell
- Change to the parent folder of the unity project
- Copy the entire unity project to a new folder
Copy-Item -Path .\GameProject\* -Destination .\GameProjectCopy\ -Recurse -Force
- -Recurse to copy all the folder and sub-folder contents
- -Force is optional, but errors get thrown if folders already exist. This just overwrites them without any fuss or complaints on the command line
- Delete the ‘Assets’ folder inside the new project
Remove-Item .\GameProjectCopy\Assets\ -Recurse
- Symbolically link the Assets folder of the original project (GameProject) to a folder in the newly cloned project (GameProjectCopy)
New-Item -Path .\GameProjectCopy\Assets\ -ItemType SymbolicLink -Value .\GameProject\Assets\
- Ensure the project are properly linked
- Open the Assets folder in Windows Explorer in both projects
- Create a file in one folder and ensure the file appears in the other folder
- Open Unity for both projects.
This should be enough to trick Unity into opening the same project in two different Editors. The advantage of this technique over just copying the project to another folder is that changes saved in one editor are immediately available in the other one. Both Editors are always in sync!