Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question VSCode arguments as Revision Control Diff/Merge tool

Discussion in 'Code Editors & IDEs' started by Mal1t1a, Jan 19, 2022.

  1. Mal1t1a

    Mal1t1a

    Joined:
    Jul 3, 2020
    Posts:
    3
    Hello,

    I'm trying to use Visaul 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. 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.

    I have been using this: https://docs.unity3d.com/2020.3/Documentation/Manual/SmartMerge.html
    and this: https://docs.unity3d.com/2021.1/Documentation/ScriptReference/EditorUtility.SetCustomDiffTool.html
    As my references for what parameters to use.

    Here is an image of the configuration that no longer works: Screenshot 2022-01-19 080155.png
     
  2. konyi

    konyi

    Joined:
    Jun 23, 2011
    Posts:
    18
    Could you try #ABSLEFT and #ABSRIGHT keywords?
     
  3. Mal1t1a

    Mal1t1a

    Joined:
    Jul 3, 2020
    Posts:
    3
    I have tried #ABSLEFT and #ABSRIGHT originally and that didn't work until I changed it to #LEFT and #RIGHT
     
  4. Mal1t1a

    Mal1t1a

    Joined:
    Jul 3, 2020
    Posts:
    3
    This issue still has not been resolved. Should I just repost this question in the answers forums?
     
  5. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,220
    What if you place ' ' around the path?

    Maybe your file or path have white space and so it need to have quote? I am not sure