Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

AndroidExternalToolsSettings

class in UnityEditor.Android

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Contains properties to modify Android specific settings in the External Tools window accessible through the Preferences window.

It allows you to customize Android development tools by defining paths to the Android SDK, NDK, and other dependencies for your project.

using UnityEngine; 
using UnityEditor;
using UnityEditor.Android;

public class AndroidExternalToolsSettingsSample { [MenuItem("Tools/Set Android External Tools settings")] public static void SetAndroidExternalToolsSettings() { // Set a custom path for the Java Development Kit (JDK). // Replace this with the actual path. AndroidExternalToolsSettings.jdkRootPath = "/path/to/your/jdk"; Debug.Log($"Custom JDK Path set to: {AndroidExternalToolsSettings.jdkRootPath}");

// Set a custom maximum heap size for the JVM (in MB). Example: 1024 MB // Ensure the value is at least the minimum allowed (128 MB) int customHeapSize = 1024;

if (customHeapSize >= 128) { AndroidExternalToolsSettings.maxJvmHeapSize = 1024; Debug.Log($"Max JVM Heap Size set to: {AndroidExternalToolsSettings.maxJvmHeapSize} MB"); } else { Debug.LogError($"Invalid heap size. The value must be at least 128 MB."); } } }

Static Properties

Property Description
jdkRootPathPath to the Java Development Kit (JDK) used for building Android applications.
keystoresDedicatedLocationPath to a location dedicated to keystores for signing Android applications.
maxJvmHeapSizeThe maximum java heap size (in megabytes) that will be used for building Android applications.
ndkRootPathPath to the Android Native Development Kit (NDK) used for building Android applications.
sdkRootPathPath to the Android Software Development Kit (SDK) used for building Android applications.