BITKit/Src/UnityPluginsSupport/Editor/Helper_I18N.cs

34 lines
968 B
C#

using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;
namespace BITKit
{
public class Helper_I18N : MonoBehaviour
{
[PostProcessBuild(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
return;
var folder = Path.Combine(Path.GetDirectoryName(EditorApplication.applicationPath), "Data",
"MonoBleedingEdge", "lib", "mono", "unityjit-win32");
var list = new List<string>()
{
"I18N.CJK.dll", "I18N.dll", "I18N.MidEast.dll", "I18N.Other.dll", "I18N.Rare.dll", "I18N.West.dll"
};
foreach (var name in list)
{
var fileInfo = new FileInfo(Path.Combine(folder, name));
var copyPath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject),
$"{Application.productName}_Data", "Plugins", "x86_64", name);
fileInfo.CopyTo(copyPath);
Debug.Log($"已复制{name}到{copyPath}");
}
}
}
}