@@ -75,15 +75,15 @@ static bool Exec(string filename, string args)
75
75
public static bool ValidateConfig ( )
76
76
{
77
77
string sdkPath = EditorPrefs . GetString ( "AndroidSdkRoot" , "" ) ;
78
- if ( string . IsNullOrEmpty ( sdkPath ) ) { sdkPath = DEFAULT_SDK_PATH ; }
78
+ if ( string . IsNullOrEmpty ( sdkPath ) || ! Directory . Exists ( sdkPath ) ) { sdkPath = DEFAULT_SDK_PATH ; }
79
79
if ( string . IsNullOrEmpty ( sdkPath ) || ! Directory . Exists ( sdkPath ) )
80
80
{
81
81
Debug . LogError ( "sdk path is empty! please config via menu path:Edit/Preference->External tools." ) ;
82
82
return false ;
83
83
}
84
84
85
85
string jdkPath = EditorPrefs . GetString ( "JdkPath" , "" ) ;
86
- if ( string . IsNullOrEmpty ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
86
+ if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
87
87
if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) )
88
88
{
89
89
Debug . LogError ( "jdk path is empty! please config via menu path:Edit/Preference->External tools." ) ;
@@ -92,7 +92,7 @@ public static bool ValidateConfig()
92
92
93
93
string ndkPath = EditorPrefs . GetString ( "AndroidNdkRootR16b" , "" ) ;
94
94
if ( string . IsNullOrEmpty ( ndkPath ) ) { ndkPath = EditorPrefs . GetString ( "AndroidNdkRoot" , "" ) ; }
95
- if ( string . IsNullOrEmpty ( ndkPath ) ) { ndkPath = DEFAULT_NDK_PATH ; }
95
+ if ( string . IsNullOrEmpty ( ndkPath ) || ! Directory . Exists ( ndkPath ) ) { ndkPath = DEFAULT_NDK_PATH ; }
96
96
if ( string . IsNullOrEmpty ( ndkPath ) || ! Directory . Exists ( ndkPath ) )
97
97
{
98
98
Debug . LogError ( "ndk path is empty! please config via menu path:Edit/Preference->External tools." ) ;
@@ -162,7 +162,7 @@ public static bool ExportGradleProject()
162
162
public static bool BuildIl2cppSoLib ( )
163
163
{
164
164
string jdkPath = EditorPrefs . GetString ( "JdkPath" , "" ) ;
165
- if ( string . IsNullOrEmpty ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
165
+ if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
166
166
if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) )
167
167
{
168
168
Debug . LogError ( "jdk path is empty! please config via menu path:Edit/Preference->External tools." ) ;
@@ -308,7 +308,7 @@ public static bool GenerateBinPatches()
308
308
public static bool GenerateBuildScripts ( )
309
309
{
310
310
string jdkPath = EditorPrefs . GetString ( "JdkPath" , "" ) ;
311
- if ( string . IsNullOrEmpty ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
311
+ if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) ) { jdkPath = DEFAULT_JDK_PATH ; }
312
312
if ( string . IsNullOrEmpty ( jdkPath ) || ! Directory . Exists ( jdkPath ) )
313
313
{
314
314
Debug . LogError ( "jdk path is empty! please config via menu path:Edit/Preference->External tools." ) ;
0 commit comments