该脚本会自动在桌面 及自启文件夹 设置快捷方式,不用担心覆盖等问题
Dll 链接:
https://download.csdn.net/download/qq_39097425/87785470
using System;
using System.IO;
using UnityEngine;
public class MonkeyAutoStartUp : MonoBehaviour
{
private static string ShortcutName = "KY.lnk";
private void Start()
{
print("Desktop " + Environment.GetFolderPath(Environment.SpecialFolder.Desktop));
#if !UNITY_EDITOR
CheckLinkExist();
SetStartupLink();
#endif
}
private void SetStartupLink()
{
CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.Startup), ShortcutName, System.Diagnostics.Process.GetCurrentProcess().M