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

Commit052ea6f

Browse files
committed
check if project settings file is old binary
1 parente16e225 commit052ea6f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎UnityLauncherPro/MainWindow.xaml.cs‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,10 +2525,21 @@ private void MenuItemBrowsePersistentDataPath_Click(object sender, RoutedEventAr
25252525
if(string.IsNullOrEmpty(projPath)==true)return;
25262526

25272527
varpsPath=Path.Combine(projPath,"ProjectSettings","ProjectSettings.asset");
2528-
if(File.Exists(psPath)==false)return;
2528+
if(File.Exists(psPath)==false)
2529+
{
2530+
Console.WriteLine("Project settings not found: "+psPath);
2531+
return;
2532+
}
25292533
// read project settings
25302534
varrows=File.ReadAllLines(psPath);
25312535

2536+
// NOTE old projects have binary version of this file, so cannot parse it, check if first line contains YAML
2537+
if(rows[0].IndexOf("YAML")==-1)
2538+
{
2539+
Console.WriteLine("Project settings file is binary, cannot parse: "+psPath);
2540+
return;
2541+
}
2542+
25322543
// search company and product name rows
25332544
for(inti=0,len=rows.Length;i<len;i++)
25342545
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp