Skip to content

Instantly share code, notes, and snippets.

@KorStrix
Created February 5, 2020 09:12
Show Gist options
  • Select an option

  • Save KorStrix/25da90341a05e26e716bd437cc485ddf to your computer and use it in GitHub Desktop.

Select an option

Save KorStrix/25da90341a05e26e716bd437cc485ddf to your computer and use it in GitHub Desktop.
#region Header
/* ============================================
* Aurthor : 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 UnityPathHelper
{
[MenuItem("Tools/OpenFolder/Open Persistent Path")]
static public void Open_PersistentPath()
{
System.Diagnostics.Process.Start(Application.persistentDataPath);
}
[MenuItem("Tools/OpenFolder/Open LocalLow Unity Path")]
static public 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")]
static public void Open_AndroidSDK_Path()
{
System.Diagnostics.Process.Start(EditorPrefs.GetString("AndroidSdkRoot"));
}
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment