Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9a37eb

Browse files
committed
Breaking change: Custom project name (from rename project), is now saved under UserSettings/ folder (instead of ProjectSettings/)
So that every user could have their own project names if needed. (that folder is not saved into git)
1 parente54991a commitb9a37eb

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

‎UnityLauncherPro/Tools.cs‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
695695
if(exeURL==null)
696696
{
697-
Console.WriteLine("TODO DownloadInBrowser");
697+
Console.WriteLine("TODO DownloadInBrowser ,v="+version);
698+
return;
698699
}
699700

700701
if(preferFullInstaller==true)
@@ -780,6 +781,7 @@ public static async void DownloadAndInstall(string version)
780781
publicstaticasyncTaskDownloadInitScript(stringcurrentInitScriptFullPath,stringcurrentInitScriptLocationOrURL)
781782
{
782783
stringcurrentInitScriptFolder=Path.GetDirectoryName(currentInitScriptFullPath);
784+
783785
stringcurrentInitScriptFile=Path.GetFileName(currentInitScriptFullPath);
784786
stringtempFile=Path.Combine(Path.GetTempPath(),currentInitScriptFile);
785787
boolisLocalFile=false;
@@ -1568,26 +1570,39 @@ public static string GetTargetPlatform(string projectPath)
15681570

15691571
publicstaticstringReadCustomProjectData(stringprojectPath,stringcustomFile)
15701572
{
1571-
stringresults=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(vardirectoryindirectories)
15741577
{
1575-
results=string.Join(" ",File.ReadAllLines(customFile));
1578+
stringfilePath=Path.Combine(projectPath,directory,customFile);
1579+
if(File.Exists(filePath))
1580+
{
1581+
returnstring.Join(" ",File.ReadAllLines(filePath));
1582+
}
15761583
}
1577-
returnresults;
1584+
1585+
returnnull;
15781586
}
15791587

15801588
publicstaticboolSaveCustomProjectData(stringprojectPath,stringcustomFile,stringdata)
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+
varcustomPath=Path.Combine(projectPath,"UserSettings");
1592+
if(!Directory.Exists(customPath))
1593+
{
1594+
Directory.CreateDirectory(customPath);
1595+
}
15831596

1597+
customFile=Path.Combine(customPath,customFile);
15841598
try
15851599
{
15861600
File.WriteAllText(customFile,data);
15871601
returntrue;
15881602
}
15891603
catch(Exception)
15901604
{
1605+
SetStatus("Failed to save custom project data to: "+customFile);
15911606
}
15921607

15931608
returnfalse;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp