Version: 2022.3
言語: 日本語
public static void SetCustomDiffTool (string path, string twoWayDiff, string threeWayDiff, string mergeCommand, bool forceEnableCustomTool);

パラメーター

path Diff tool path.
twoWayDiff Two - way diff command line.
threeWayDiff Three - way diff command line.
mergeCommand Merge command line.
forceEnableCustomTool Sets Custom Tool as current active Revision Control Diff/Merge tool.

説明

Set custom diff tool settings.

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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961