Created
October 20, 2025 04:22
-
-
Save baba-s/a14c04653d85ba6fb91f52c0393fd1ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO; | |
| using System.Linq; | |
| using UnityEditor; | |
| namespace Kogane | |
| { | |
| public static class AndroidBundletoolPath | |
| { | |
| private static string m_value; | |
| public static string Value | |
| { | |
| get | |
| { | |
| if ( !string.IsNullOrWhiteSpace( m_value ) ) return m_value; | |
| var contentsDirectoryName = EditorApplication.applicationPath.Replace( "Unity.app", "" ); | |
| var toolsDirectoryName = $"{contentsDirectoryName}PlaybackEngines/AndroidPlayer/Tools"; | |
| m_value = Directory | |
| .EnumerateFiles | |
| ( | |
| path: toolsDirectoryName, | |
| searchPattern: "bundletool-all-*.jar", | |
| searchOption: SearchOption.TopDirectoryOnly | |
| ) | |
| .FirstOrDefault() | |
| ; | |
| return m_value; | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment