以下是unity集成 svn 并在提交的时候 使用svn命令自动提交的代码。
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
public class SVNEditor
{
public enum SVN_TYPE
{
commit,
update,
add,
log,
}
#region 调用SVN操作的函数
[MenuItem("Assets/A_SVN/Update", false, -1)]
static void UpdateSVN()
{
SVNBatCommandAndRun(SVN_TYPE.update, GetPath());
}
[MenuItem("Assets/A_SVN/Commit", false, -1)]
static void CommitSVN()
{
SVNBatCommandAndRun(SVN_TYPE.commit, GetPath());
}
[MenuItem("Assets/A_SVN/Add", false,