using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace ShadowEditor.Server.Remote { /// /// 远程编辑帮助函数 /// public class RemoteHelper { /// /// 获取远程编辑临时路径 /// /// public static string GetRemotePath() { var path = AppDomain.CurrentDomain.BaseDirectory; if (path.EndsWith("\\")) { path = path.Substring(0, path.Length - 1); } var paths = path.Split('\\').ToList(); paths.RemoveAt(paths.Count - 1); paths.Add("SceneScript"); path = string.Join("\\", paths); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return path; } } }