Skip to content

Instantly share code, notes, and snippets.

@baba-s
Created October 20, 2025 04:22
Show Gist options
  • Select an option

  • Save baba-s/a14c04653d85ba6fb91f52c0393fd1ac to your computer and use it in GitHub Desktop.

Select an option

Save baba-s/a14c04653d85ba6fb91f52c0393fd1ac to your computer and use it in GitHub Desktop.
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