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
23using System ;
34using System . Collections ;
45using System . Collections . Generic ;
@@ -434,7 +435,11 @@ private IEnumerator InstallRelease(int index)
434435 if ( Directory . Exists ( Application . dataPath + "/MLAPI/Lib/" ) )
435436 Directory . Delete ( Application . dataPath + "/MLAPI/Lib/" , true ) ;
436437
438+ if ( Directory . Exists ( Application . dataPath + "/Editor/" ) )
439+ Directory . Delete ( Application . dataPath + "/Editor/MLAPI/" , false ) ;
440+
437441 Directory . CreateDirectory ( Application . dataPath + "/MLAPI/Lib/" ) ;
442+ Directory . CreateDirectory ( Application . dataPath + "/Editor/MLAPI/" ) ;
438443
439444 bool downloadFail = false ;
440445 for ( int i = 0 ; i < releases [ index ] . assets . Length ; i ++ )
@@ -462,7 +467,15 @@ private IEnumerator InstallRelease(int index)
462467 statusMessage = "Writing " + releases [ index ] . assets [ i ] . name + " to disk" ;
463468 yield return null ;
464469
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+
466479 yield return null ;
467480 }
468481 progress = i ;
You can’t perform that action at this time.
0 commit comments