IndieGame/client/Assets/Ether/Editor/Tools/OpenCachePath/OpenCachePathEditor.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

29 lines
743 B
C#

using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
namespace Ether
{
public class OpenCachePathEditor
{
static string persistentCachePath = Application.persistentDataPath;
[MenuItem("工具/打开缓存路径", false, 1)]
public static void OpenCachePath()
{
if (Directory.Exists(persistentCachePath))
{
Application.OpenURL(persistentCachePath);
}
else
{
Debug.Log($"缓存路径:{persistentCachePath} 不存在,为您打开上级目录");
Application.OpenURL(persistentCachePath + "/../");
}
}
}
}