using System.IO; using UnityEditor; using UnityEngine; namespace Mogafa.Unity.Common.Editor { [InitializeOnLoad] public class CopyLinkDotXml { static CopyLinkDotXml() { var sourcePath = Path.GetFullPath("Packages/com.didabu.core.unity"); var destPath = Path.Combine(Application.dataPath, "Didabu", "Unity", "Core"); var sourceFile = Path.Combine(sourcePath, "link.xml"); var destFile = Path.Combine(destPath, "link.xml"); if (File.Exists(sourceFile)) { if (!Directory.Exists(destPath)) { Directory.CreateDirectory(destPath); } File.Copy(sourceFile, destFile, true); } } } }