using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

public class MyBuildPostprocessor
{
    [PostProcessBuild]
    public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
    {
        //Debug.Log(pathToBuiltProject);
        //System.IO.File.AppendAllText("D:\\test.txt",pathToBuiltProject);
        var dir = Path.GetDirectoryName(pathToBuiltProject);

        File.Copy(dir + "\\PowerFun-Unity_Data\\Plugins\\x86_64\\ANT_WrappedLib.dll", dir + "\\PowerFun-Unity_Data\\Managed\\ANT_WrappedLib.dll");
        File.Copy(dir + "\\PowerFun-Unity_Data\\Plugins\\x86_64\\DSI_CP210xManufacturing_3_1.dll", dir + "\\PowerFun-Unity_Data\\Managed\\DSI_CP210xManufacturing_3_1.dll");
        File.Copy(dir + "\\PowerFun-Unity_Data\\Plugins\\x86_64\\DSI_SiUSBXp_3_1.dll", dir + "\\PowerFun-Unity_Data\\Managed\\DSI_SiUSBXp_3_1.dll");
    }
}
