File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
- #if INCLUDE_INSTALLER
1
+ #define INCLUDE_INSTALLER
2
+ #if INCLUDE_INSTALLER
2
3
using System ;
3
4
using System . Collections ;
4
5
using System . Collections . Generic ;
@@ -434,7 +435,11 @@ private IEnumerator InstallRelease(int index)
434
435
if ( Directory . Exists ( Application . dataPath + "/MLAPI/Lib/" ) )
435
436
Directory . Delete ( Application . dataPath + "/MLAPI/Lib/" , true ) ;
436
437
438
+ if ( Directory . Exists ( Application . dataPath + "/Editor/" ) )
439
+ Directory . Delete ( Application . dataPath + "/Editor/MLAPI/" , false ) ;
440
+
437
441
Directory . CreateDirectory ( Application . dataPath + "/MLAPI/Lib/" ) ;
442
+ Directory . CreateDirectory ( Application . dataPath + "/Editor/MLAPI/" ) ;
438
443
439
444
bool downloadFail = false ;
440
445
for ( int i = 0 ; i < releases [ index ] . assets . Length ; i ++ )
@@ -462,7 +467,15 @@ private IEnumerator InstallRelease(int index)
462
467
statusMessage = "Writing " + releases [ index ] . assets [ i ] . name + " to disk" ;
463
468
yield return null ;
464
469
465
- File . WriteAllBytes ( Application . dataPath + "/MLAPI/Lib/" + releases [ index ] . assets [ i ] . name , www . bytes ) ;
470
+ if ( ! releases [ index ] . assets [ i ] . name . ToLower ( ) . Contains ( "editor" ) )
471
+ {
472
+ File . WriteAllBytes ( Application . dataPath + "/MLAPI/Lib/" + releases [ index ] . assets [ i ] . name , www . bytes ) ;
473
+ }
474
+ else
475
+ {
476
+ File . WriteAllBytes ( Application . dataPath + "/Editor/MLAPI/" + releases [ index ] . assets [ i ] . name , www . bytes ) ;
477
+ }
478
+
466
479
yield return null ;
467
480
}
468
481
progress = i ;
You can’t perform that action at this time.
0 commit comments