29 lines
743 B
C#
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 + "/../");
|
|
}
|
|
}
|
|
}
|
|
}
|