【框架】增加一个测试方法
parent
0a9f583e6d
commit
cdff131f6f
|
|
@ -0,0 +1,28 @@
|
|||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectBuilder
|
||||
{
|
||||
public class NoWindowFunctions
|
||||
{
|
||||
[MenuItem("Tools/文件与路径/转换为Dll")]
|
||||
public static void CovertToDll()
|
||||
{
|
||||
var dllPath = Application.dataPath + "/../Library/ScriptAssemblies/GamePlay.dll";
|
||||
//Assets/Code/Scripts/Gameplay
|
||||
var codePath = Application.dataPath + "/Code/Scripts/Gameplay";
|
||||
|
||||
// 删除Code/Scripts/Gameplay下的所有文件
|
||||
var directoryInfo = new System.IO.DirectoryInfo(codePath);
|
||||
directoryInfo.Delete(true);
|
||||
|
||||
// 复制GamePlay.dll到Code/Scripts/Gameplay
|
||||
Directory.CreateDirectory(codePath);
|
||||
File.Copy(dllPath, codePath + "/GamePlay.dll", true);
|
||||
|
||||
// 刷新
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d6e46d53cfca4a83a29ff5b76244386c
|
||||
timeCreated: 1745919657
|
||||
Loading…
Reference in New Issue