I have been tinkering with Unity’s editor and managed to create a tool that helps me copy files from one directory to the other. It works fine, but for some reason when I want it to copy my files to the desktop it just doesn’t let me. It tells me that it fails to copy files.
using UnityEditor;
using System.Diagnostics;
public class UnityEditorClass {
[MenuItem("Tools/DLL With Postprocess")]
public static void BuildGame()
{
// Copy a file from the project folder to the build folder, alongside the built game.
FileUtil.CopyFileOrDirectory("C:/Projects/SchoolProjects/GSP290/MyFirstGame/vector2.dll", "Desktop/vector2.dlll");
FileUtil.CopyFileOrDirectory("C:/Projects/SchoolProjects/GSP290/MyFirstGame/matrixHelper.dll", "Desktop/matrixHelper.dll");
}
}
Can anyone help me figure out what I am doing wrong and how can I fix this? Thank you in advance!