Fix Gradle-path API guard: use UNITY_6000_2_OR_NEWER (Gradle.path was added in 6000.2, not 6000.0)#219
Merged
sierpinskid merged 1 commit intoJul 2, 2026
Conversation
…_OR_NEWER
StreamEditorTools guards its Android Gradle-path access with
UNITY_6000_0_OR_NEWER and calls AndroidExternalToolsSettings.Gradle.path. But
the nested Gradle grouping (Gradle.path / Gradle.userHomePath) was only
introduced in Unity 6000.2. On 6000.0.x and 6000.1.x, AndroidExternalToolsSettings
exposes only the flat gradlePath property, so the editor tools fail to compile:
StreamEditorTools.cs(60,61): error CS0117: 'AndroidExternalToolsSettings'
does not contain a definition for 'Gradle'
Move the boundary to UNITY_6000_2_OR_NEWER so:
* 6000.0 / 6000.1 -> flat AndroidExternalToolsSettings.gradlePath
* 6000.2+ -> nested AndroidExternalToolsSettings.Gradle.path
(gradlePath is [Obsolete] there; Gradle.path avoids the warning)
sierpinskid
approved these changes
Jul 2, 2026
sierpinskid
approved these changes
Jul 2, 2026
Member
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
StreamEditorToolsguards its Android Gradle-path access with#if UNITY_6000_0_OR_NEWERand callsAndroidExternalToolsSettings.Gradle.path. However, the nestedGradlegrouping (Gradle.path/Gradle.userHomePath) was only introduced in Unity 6000.2. On 6000.0.x and 6000.1.x,AndroidExternalToolsSettingsexposes only the flatgradlePathstring property, so the editor tools fail to compile there:This breaks the package on any 6000.0 / 6000.1 LTS project (e.g. Unity 6000.0.71f1).
Fix
Change the guard boundary in both
#ifblocks fromUNITY_6000_0_OR_NEWERtoUNITY_6000_2_OR_NEWER:AndroidExternalToolsSettings.gradlePath(not deprecated on these versions)AndroidExternalToolsSettings.Gradle.path(on 6000.2gradlePathis[Obsolete], so this also avoids the deprecation warning)References
gradlePath— current / 6000.0–6000.1 APIGradle.path— 6000.2 API (and the 6000.2gradlePathpage marks it obsolete: "Use Gradle.path instead")