更新测试代码

main
刘涛 2025-04-29 17:54:49 +08:00
parent cdff131f6f
commit d02f3b3025
1 changed files with 12 additions and 0 deletions

View File

@ -9,9 +9,21 @@ namespace ProjectBuilder
[MenuItem("Tools/文件与路径/转换为Dll")]
public static void CovertToDll()
{
if (Application.isPlaying)
{
Debug.LogError("不能在运行时转换为Dll");
return;
}
var dllPath = Application.dataPath + "/../Library/ScriptAssemblies/GamePlay.dll";
//Assets/Code/Scripts/Gameplay
var codePath = Application.dataPath + "/Code/Scripts/Gameplay";
var targetDllPath = codePath + "/GamePlay.dll";
if (File.Exists(targetDllPath))
{
// 说明已经转换过了
Debug.LogError("已经转换过了");
return;
}
// 删除Code/Scripts/Gameplay下的所有文件
var directoryInfo = new System.IO.DirectoryInfo(codePath);