clean up code

This commit is contained in:
Perfare
2017-11-10 03:36:08 +08:00
parent 9d505c8900
commit 3a6ebf7ce6
11 changed files with 116 additions and 86 deletions

View File

@ -91,7 +91,13 @@ namespace Unity_Studio
{
MergeSplitAssets(mainPath);
//unityFiles.AddRange(openFileDialog1.FileNames);
//Only verify whether the first file is bundle file
if (CheckBundleFile(openFileDialog1.FileNames[0]))
{
MessageBox.Show($"{Path.GetFileName(openFileDialog1.FileNames[0])} is bundle file, please select bundle file type to load this file");
return;
}
foreach (var i in openFileDialog1.FileNames)
{
unityFiles.Add(i);
@ -197,7 +203,7 @@ namespace Unity_Studio
private void extractBundleToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog openBundleDialog = new OpenFileDialog();
openBundleDialog.Filter = "Unity bundle files|*.unity3d; *.unity3d.lz4; *.assetbundle; *.bundle; *.bytes|All files (use at your own risk!)|*.*";
openBundleDialog.Filter = "Unity bundle files|*.*";
openBundleDialog.FilterIndex = 1;
openBundleDialog.RestoreDirectory = true;
openBundleDialog.Multiselect = true;