@@ -187,8 +187,8 @@ public static string GetAssetPath(string relPath = "")
187187 [ InitializeOnLoadMethod ]
188188 static async Task InitializeOnLoad ( )
189189 {
190- await DownloadLibrary ( ) ;
191190 LoadPlayerPrefs ( ) ;
191+ await DownloadLibrary ( ) ;
192192 }
193193
194194#else
@@ -370,9 +370,11 @@ void DeleteFileAndMeta(string path)
370370 string androidDir = Path . Combine ( libraryPath , "android" ) ;
371371 if ( Directory . Exists ( androidDir ) )
372372 {
373- string androidPluginDir = Path . Combine ( Application . dataPath , "Plugins" , "Android" ) ;
374- Directory . CreateDirectory ( androidPluginDir ) ;
375- Directory . Move ( androidDir , Path . Combine ( androidPluginDir , Path . GetFileName ( libraryPath ) ) ) ;
373+ string androidPluginsDir = Path . Combine ( Application . dataPath , "Plugins" , "Android" ) ;
374+ Directory . CreateDirectory ( androidPluginsDir ) ;
375+ string pluginDir = Path . Combine ( androidPluginsDir , Path . GetFileName ( libraryPath ) ) ;
376+ if ( Directory . Exists ( pluginDir ) ) Directory . Delete ( pluginDir , true ) ;
377+ Directory . Move ( androidDir , pluginDir ) ;
376378 if ( File . Exists ( androidDir + ".meta" ) ) File . Delete ( androidDir + ".meta" ) ;
377379 }
378380 AssetDatabase . StopAssetEditing ( ) ;
@@ -390,7 +392,7 @@ void DeleteFileAndMeta(string path)
390392
391393 private static void SetLibraryProgress ( float progress )
392394 {
393- libraryProgress = progress ;
395+ libraryProgress = Math . Min ( 0.99f , progress ) ;
394396 }
395397
396398 public static string AddAsset ( string assetPath )
0 commit comments