#if UNITY_64 || UNITY_EDITOR using System; using System.Collections.Generic; using System.Text; using System.IO; using UnityEditor; using UnityEngine; namespace Mogafa.App.Editors { [InitializeOnLoad] public class CopyLinkDotXmlEditor { static CopyLinkDotXmlEditor() { var sourcePath = Path.GetFullPath("Packages/com.mogafa.csharp.app.unity"); var destPath = Path.Combine(Application.dataPath, "Mogafa", "App"); 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); } if (!File.Exists(destFile)) { File.Copy(sourceFile, destFile, true); } } } } } #endif