@@ -694,7 +694,8 @@ public static async void DownloadInBrowser(string version, bool preferFullInstal
694694// https://beta.unity3d.com/download/330fbefc18b7/UnityDownloadAssistant-6000.1.0a8.exe
695695if ( exeURL == null )
696696{
697- Console . WriteLine ( "TODO DownloadInBrowser" ) ;
697+ Console . WriteLine ( "TODO DownloadInBrowser ,v=" + version ) ;
698+ return ;
698699}
699700
700701if ( preferFullInstaller == true )
@@ -780,6 +781,7 @@ public static async void DownloadAndInstall(string version)
780781public static async Task DownloadInitScript ( string currentInitScriptFullPath , string currentInitScriptLocationOrURL )
781782{
782783string currentInitScriptFolder = Path . GetDirectoryName ( currentInitScriptFullPath ) ;
784+
783785string currentInitScriptFile = Path . GetFileName ( currentInitScriptFullPath ) ;
784786string tempFile = Path . Combine ( Path . GetTempPath ( ) , currentInitScriptFile ) ;
785787bool isLocalFile = false ;
@@ -1568,26 +1570,39 @@ public static string GetTargetPlatform(string projectPath)
15681570
15691571public static string ReadCustomProjectData ( string projectPath , string customFile )
15701572{
1571- string results = null ;
1572- customFile = Path . Combine ( projectPath , "ProjectSettings" , customFile ) ;
1573- if ( File . Exists ( customFile ) == true )
1573+ // ProjectSettings is the old deprecated location (and current location from Hub 3.15.x, but later they will use UserSettings first too)
1574+ string [ ] directories = { "UserSettings" , "ProjectSettings" } ;
1575+
1576+ foreach ( var directory in directories )
15741577{
1575- results = string . Join ( " " , File . ReadAllLines ( customFile ) ) ;
1578+ string filePath = Path . Combine ( projectPath , directory , customFile ) ;
1579+ if ( File . Exists ( filePath ) )
1580+ {
1581+ return string . Join ( " " , File . ReadAllLines ( filePath ) ) ;
1582+ }
15761583}
1577- return results ;
1584+
1585+ return null ;
15781586}
15791587
15801588public static bool SaveCustomProjectData ( string projectPath , string customFile , string data )
15811589{
1582- customFile = Path . Combine ( projectPath , "ProjectSettings" , customFile ) ;
1590+ // NOTE: now saving into UserSettings folder only (there might be old custom data is in ProjectSettings/ still..)
1591+ var customPath = Path . Combine ( projectPath , "UserSettings" ) ;
1592+ if ( ! Directory . Exists ( customPath ) )
1593+ {
1594+ Directory . CreateDirectory ( customPath ) ;
1595+ }
15831596
1597+ customFile = Path . Combine ( customPath , customFile ) ;
15841598try
15851599{
15861600File . WriteAllText ( customFile , data ) ;
15871601return true ;
15881602}
15891603catch ( Exception )
15901604{
1605+ SetStatus ( "Failed to save custom project data to: " + customFile ) ;
15911606}
15921607
15931608return false ;