Hello,
I’m trying to use Visual Studio Code as my Diff/Merge tool and I’m running into some issues regarding the arguments. I am currently running: Unity 2020.3.14f1
Right now, I go to Edit > Preferences > External Tools and change the Revision Control Diff/Merge setting to Custom Tool.
I then proceed to browse to the location of my visual studio code installation: F:/Programs/Microsoft VS Code/Code.exe
Here is where the issue occurs. Awhile back, I had found that if I put #LEFT and #RIGHT as the arguments, Unity would replace them with the respective files (I had previously tried #ABSLEFT and #ABSRIGHT which didn’t work).
So in the field: Two-way diff command line I would simply fill in: -d #LEFT #RIGHT
By doing so, I would click the View Diff button in Unity Collaborate and it would compare both files side-by-side (this feature is built-in to vscode).
My issue is that this no longer works. VSCode just opens up a new window but there is no files being compared like before. I’m not sure if the argument names have changed but anything I have tried did not work. How can I use VSCode as the diff/merge tool again for Unity?
I have been using these as references:
- https://docs.unity3d.com/2020.1/Documentation/Manual/Preferences.html#External-Tools
- https://docs.unity3d.com/2021.1/Documentation/ScriptReference/EditorUtility.SetCustomDiffTool.html
- https://docs.unity3d.com/2020.3/Documentation/Manual/SmartMerge.html
As my references for what parameters to use.
Here is an image of the configuration that no longer works: