# SetCustomDiffTool(string, string, string, string, bool)

> Set custom diff tool settings.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static void SetCustomDiffTool(string path, string twoWayDiff, string threeWayDiff, string mergeCommand, bool forceEnableCustomTool = false)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Diff tool path.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Two - way diff command line.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Three - way diff command line.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Merge command line.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Sets Custom Tool as current active Revision Control Diff/Merge tool.

### Remarks

```csharp
using UnityEditor;
using UnityEngine;

public class EditorScript : MonoBehaviour
{
    [MenuItem("SetCustomDiffTool/DiffMerge")]
    public static void ExampleSetCustomDiffTool()
    {
        string path = "/Applications/DiffMerge.app/Contents/MacOS/DiffMerge";
        string twoWayDiffCommandLine = "-t1 #LTITLE -t2 #RTITLE #LEFT #RIGHT";
        string threeWayDiffCommandLine = "-t1 #LTITLE -t2 #ATITLE -t3 #RTITLE -ro2 #LEFT #ANCESTOR #RIGHT";
        string mergeArguments = "-m -t1 #LTITLE -t2 #ATITLE -t3 #RTITLE -r #OUTPUT #LEFT #ANCESTOR #RIGHT";

        EditorUtility.SetCustomDiffTool(path, twoWayDiffCommandLine, threeWayDiffCommandLine, mergeArguments);
    }
}
```

For more information about diff tools, see [ Revision Control Diff/Merge](/engine/6000.7/manual/unity-editor/editor-settings-reference/preferences/external-tools.md).
