Fixed bug

This commit is contained in:
Perfare 2018-11-07 17:15:54 +08:00
parent c2ae9e63e0
commit f5aef9486f
2 changed files with 4 additions and 10 deletions

View File

@ -217,7 +217,7 @@ namespace AssetStudio
classesListView.EndUpdate();
}
var types = exportableAssets.Select(x => x.Type).Distinct().ToArray();
var types = exportableAssets.Select(x => x.Type).Distinct().OrderBy(x => x.ToString()).ToArray();
foreach (var type in types)
{
var typeItem = new ToolStripMenuItem

View File

@ -199,20 +199,14 @@ namespace AssetStudio
}
buildType = Regex.Replace(unityVersion, @"\d", "").Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries);
var firstVersion = int.Parse(unityVersion.Split('.')[0]);
version = Regex.Matches(unityVersion, @"\d").Cast<Match>().Select(m => int.Parse(m.Value)).ToArray();
if (firstVersion > 5)//2017 and up
{
var nversion = new int[version.Length - 3];
nversion[0] = firstVersion;
Array.Copy(version, 4, nversion, 1, version.Length - 4);
version = nversion;
}
var versionSplit = Regex.Replace(unityVersion, @"\D", ".").Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries);
version = versionSplit.Select(int.Parse).ToArray();
valid = true;
}
catch
{
// ignored
}
}