-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathUnityFolderPathEditor.cs
63 lines (54 loc) · 1.99 KB
/
UnityFolderPathEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#region Header
/* ============================================
* Author : Strix
* Initial Creation Date : 2020-02-05
* Summary :
* Template : For Unity Editor V1
============================================ */
#endregion Header
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
/// <summary>
/// 자주 들어가는 폴더경로 모음
/// </summary>
public static class UnityFolderPathEditor
{
[MenuItem("Tools/OpenFolder/Open Persistent Path")]
public static void Open_PersistentPath()
{
System.Diagnostics.Process.Start(Application.persistentDataPath);
}
[MenuItem("Tools/OpenFolder/Open LocalLow Unity Path")]
public static void Open_CahcedBundle_Path()
{
string strPath_Unity = Application.persistentDataPath + "/../../Unity/";
string strPath_Include_Compnay_And_Product = $"{strPath_Unity}{Application.companyName}_{Application.productName}";
if(System.IO.Directory.Exists(strPath_Include_Compnay_And_Product))
System.Diagnostics.Process.Start(strPath_Include_Compnay_And_Product);
else
{
Debug.LogWarning("Not Contain Path - " + strPath_Include_Compnay_And_Product);
System.Diagnostics.Process.Start(strPath_Unity);
}
}
[MenuItem("Tools/OpenFolder/Open AndroidSDK Path")]
public static void Open_AndroidSDK_Path()
{
System.Diagnostics.Process.Start(EditorPrefs.GetString("AndroidSdkRoot"));
}
[MenuItem("Tools/OpenFolder/Open Editor Log")]
public static void Open_EditorLog_Path()
{
string strPath_Unity = Application.persistentDataPath + "/../../../Local/";
if (System.IO.Directory.Exists(strPath_Unity))
{
string strPath = "Unity/Editor/";
if (System.IO.Directory.Exists(strPath_Unity + strPath))
System.Diagnostics.Process.Start(strPath_Unity + strPath);
else
System.Diagnostics.Process.Start(strPath_Unity);
}
}
}
#endif