From a5825bd693ebbab6cdc600bd172f60943f33e767 Mon Sep 17 00:00:00 2001 From: VaDiM Date: Fri, 19 Jun 2026 20:59:50 +0300 Subject: [PATCH] Some other minor fixes --- AssetStudio/AssetsManager.cs | 23 +++--- AssetStudio/BundleFile.cs | 2 +- AssetStudio/Classes/AnimationClip.cs | 2 +- AssetStudio/Classes/Mesh.cs | 65 +++++++--------- AssetStudioGUI/AssetStudioGUIForm.Designer.cs | 15 ++-- AssetStudioGUI/ExportOptions.Designer.cs | 4 +- AssetStudioGUI/GameOptionsForm.Designer.cs | 12 +-- AssetStudioGUI/Studio.cs | 7 +- AssetStudioGUI/StudioOptionsForm.Designer.cs | 76 ++++++++++--------- AssetStudioGUI/StudioOptionsForm.cs | 3 +- AssetStudioGUI/StudioOptionsForm.resx | 3 - 11 files changed, 102 insertions(+), 110 deletions(-) diff --git a/AssetStudio/AssetsManager.cs b/AssetStudio/AssetsManager.cs index acf190f..ff164a2 100644 --- a/AssetStudio/AssetsManager.cs +++ b/AssetStudio/AssetsManager.cs @@ -615,17 +615,22 @@ namespace AssetStudio private void ReadAssets() { var serializedVer = AssetsFileList[0].header.m_Version; - if (serializedVer <= SerializedFileFormatVersion.Unknown_6 && serializedVer >= SerializedFileFormatVersion.Unknown_5 && AutoLegacyVersion == null && Options.GameSpecific.CustomUnityVersion == null) + switch (serializedVer) { - var versions = serializedVer == SerializedFileFormatVersion.Unknown_6 - ? "'2.1.0f1', '2.5.0f1', '2.6.0f1'" - : "'1.2.0f1', '1.6.0f1', '2.0.0f1"; - Logger.Warning( - "\nUnable to detect legacy Unity version automatically\n" + - "If the assets load with errors try to specify one of the following Unity versions\n" + - $"Possible versions: {versions}"); + case SerializedFileFormatVersion.Unknown_5: + case SerializedFileFormatVersion.Unknown_6: + if (AutoLegacyVersion == null && Options.GameSpecific.CustomUnityVersion == null) + { + var versions = serializedVer == SerializedFileFormatVersion.Unknown_6 + ? "'2.1.0f1', '2.5.0f1', '2.6.0f1'" + : "'1.2.0f1', '1.6.0f1', '2.0.0f1'"; + Logger.Warning( + "\nUnable to detect legacy Unity version automatically\n" + + "If the assets load with errors try to specify one of the following Unity versions\n" + + $"Possible versions: {versions}"); + } + break; } - Logger.Info("Read assets..."); var jsonOptions = new JsonSerializerOptions diff --git a/AssetStudio/BundleFile.cs b/AssetStudio/BundleFile.cs index 131d612..8224c1a 100644 --- a/AssetStudio/BundleFile.cs +++ b/AssetStudio/BundleFile.cs @@ -110,7 +110,7 @@ namespace AssetStudio if (bundleSize > streamSize) Logger.Warning("Bundle size is incorrect."); IsDataAfterBundle = streamSize - bundleSize > 200; - + var unityVer = m_Header.unityRevision; var customUnityVer = studioOptions.GameSpecific.CustomUnityVersion; if (customUnityVer != null) diff --git a/AssetStudio/Classes/AnimationClip.cs b/AssetStudio/Classes/AnimationClip.cs index 73dd851..5dff86c 100644 --- a/AssetStudio/Classes/AnimationClip.cs +++ b/AssetStudio/Classes/AnimationClip.cs @@ -509,7 +509,7 @@ namespace AssetStudio { var version = reader.version; data = reader.ReadUInt32Array(); - if (version.IsInRange((2022, 3, 19), 2023) //2022.3.19f1 to 2023 + if (version.IsInRange((2022, 3, 19), 2023) //2022.3.19f1 - 2023 down || version >= (2023, 2, 8)) //2023.2.8f1 and up { curveCount = reader.ReadUInt16(); diff --git a/AssetStudio/Classes/Mesh.cs b/AssetStudio/Classes/Mesh.cs index fec5805..48009c5 100644 --- a/AssetStudio/Classes/Mesh.cs +++ b/AssetStudio/Classes/Mesh.cs @@ -577,30 +577,12 @@ namespace AssetStudio m_Use16BitIndices = reader.ReadInt32() > 0; } - if (version <= (2, 5)) //2.0 - 2.5 down + if (version < (2, 6)) //2.0 - 2.6 down { - int m_IndexBufferCount = reader.ReadInt32(); - - if (m_Use16BitIndices) - { - var indexBufferList = new List(); - for (var i = 0; i < m_IndexBufferCount / 2; i++) - { - indexBufferList.Add(reader.ReadUInt16()); - } - if (version >= (2, 1)) - { - reader.AlignStream(); - } - m_IndexBuffer = indexBufferList.ToArray(); - } - else - { - m_IndexBuffer = reader.ReadUInt32Array(m_IndexBufferCount / 4); - } + m_IndexBuffer = ReadIndexBuffer(reader, m_Use16BitIndices); } - int m_SubMeshesCount = reader.ReadInt32(); + var m_SubMeshesCount = reader.ReadInt32(); reader.ThrowIfTooLarge(m_SubMeshesCount * 12f); m_SubMeshes = new List(); for (var i = 0; i < m_SubMeshesCount; i++) @@ -687,22 +669,7 @@ namespace AssetStudio m_Use16BitIndices = m_IndexFormat == 0; } - int m_IndexBufferSize = reader.ReadInt32(); - if (m_Use16BitIndices) - { - var indexBufferList = new List(); - for (var i = 0; i < m_IndexBufferSize / 2; i++) - { - indexBufferList.Add(reader.ReadUInt16()); - } - - reader.AlignStream(); - m_IndexBuffer = indexBufferList.ToArray(); - } - else - { - m_IndexBuffer = reader.ReadUInt32Array(m_IndexBufferSize / 4); - } + m_IndexBuffer = ReadIndexBuffer(reader, m_Use16BitIndices); } if (version < (3, 5)) //3.4.2 and earlier @@ -848,6 +815,30 @@ namespace AssetStudio ProcessData(); } + private static uint[] ReadIndexBuffer(ObjectReader reader, bool use16BitIndices) + { + var indexBufferSize = reader.ReadInt32(); + reader.ThrowIfTooLarge(indexBufferSize); + + if (use16BitIndices) + { + var indexBuffer = new uint[indexBufferSize / 2]; + for (var i = 0; i < indexBufferSize / 2; i++) + { + indexBuffer[i] = reader.ReadUInt16(); + } + if (reader.version >= (2, 1)) + { + reader.AlignStream(); + } + return indexBuffer; + } + else + { + return reader.ReadUInt32Array(indexBufferSize / 4); + } + } + public void ProcessData() { if (isLoaded) diff --git a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs index 9245b29..5e55670 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs @@ -415,7 +415,7 @@ this.customUnityVersionToolStripMenuItem.Enabled = false; this.customUnityVersionToolStripMenuItem.Name = "customUnityVersionToolStripMenuItem"; this.customUnityVersionToolStripMenuItem.ShowShortcutKeys = false; - this.customUnityVersionToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this.customUnityVersionToolStripMenuItem.Size = new System.Drawing.Size(222, 22); this.customUnityVersionToolStripMenuItem.Text = "Custom Unity version"; // // specifyUnityVersionTextBox @@ -431,26 +431,26 @@ // this.gameOptionsToolStripSeparator.Name = "gameOptionsToolStripSeparator"; this.gameOptionsToolStripSeparator.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; - this.gameOptionsToolStripSeparator.Size = new System.Drawing.Size(210, 6); + this.gameOptionsToolStripSeparator.Size = new System.Drawing.Size(219, 6); // // saveGameOptionsToDiskToolStripMenuItem // this.saveGameOptionsToDiskToolStripMenuItem.Name = "saveGameOptionsToDiskToolStripMenuItem"; this.saveGameOptionsToDiskToolStripMenuItem.ShowShortcutKeys = false; - this.saveGameOptionsToDiskToolStripMenuItem.Size = new System.Drawing.Size(213, 22); - this.saveGameOptionsToDiskToolStripMenuItem.Text = "Save current options to disk"; + this.saveGameOptionsToDiskToolStripMenuItem.Size = new System.Drawing.Size(222, 22); + this.saveGameOptionsToDiskToolStripMenuItem.Text = "Save current options to disk..."; this.saveGameOptionsToDiskToolStripMenuItem.Click += new System.EventHandler(this.saveOptionsToDiskToolStripMenuItem_Click); // // gameOptionsToolStripSeparator2 // this.gameOptionsToolStripSeparator2.Name = "gameOptionsToolStripSeparator2"; this.gameOptionsToolStripSeparator2.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; - this.gameOptionsToolStripSeparator2.Size = new System.Drawing.Size(210, 6); + this.gameOptionsToolStripSeparator2.Size = new System.Drawing.Size(219, 6); // // moreGameOptionsToolStripMenuItem // this.moreGameOptionsToolStripMenuItem.Name = "moreGameOptionsToolStripMenuItem"; - this.moreGameOptionsToolStripMenuItem.Size = new System.Drawing.Size(213, 22); + this.moreGameOptionsToolStripMenuItem.Size = new System.Drawing.Size(222, 22); this.moreGameOptionsToolStripMenuItem.Text = "More options..."; this.moreGameOptionsToolStripMenuItem.Click += new System.EventHandler(this.moreGameOptionsToolStripMenuItem_Click); // @@ -836,7 +836,7 @@ // this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem"; this.exportClassStructuresMenuItem.Size = new System.Drawing.Size(288, 22); - this.exportClassStructuresMenuItem.Text = "Export class structures"; + this.exportClassStructuresMenuItem.Text = "Export class structures..."; this.exportClassStructuresMenuItem.Click += new System.EventHandler(this.exportClassStructuresMenuItem_Click); // // aboutToolStripMenuItem @@ -1437,6 +1437,7 @@ // classTextBox // this.classTextBox.BackColor = System.Drawing.SystemColors.Window; + this.classTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.classTextBox.Dock = System.Windows.Forms.DockStyle.Fill; this.classTextBox.Location = new System.Drawing.Point(0, 0); this.classTextBox.Multiline = true; diff --git a/AssetStudioGUI/ExportOptions.Designer.cs b/AssetStudioGUI/ExportOptions.Designer.cs index f937e50..51f23bf 100644 --- a/AssetStudioGUI/ExportOptions.Designer.cs +++ b/AssetStudioGUI/ExportOptions.Designer.cs @@ -108,7 +108,7 @@ this.OKbutton.AutoSize = true; this.OKbutton.BackColor = System.Drawing.SystemColors.ButtonFace; this.OKbutton.Location = new System.Drawing.Point(228, 442); - this.OKbutton.Margin = new System.Windows.Forms.Padding(6); + this.OKbutton.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6); this.OKbutton.Name = "OKbutton"; this.OKbutton.Size = new System.Drawing.Size(88, 27); this.OKbutton.TabIndex = 2; @@ -899,7 +899,7 @@ this.Cancel.BackColor = System.Drawing.SystemColors.ButtonFace; this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.Cancel.Location = new System.Drawing.Point(322, 442); - this.Cancel.Margin = new System.Windows.Forms.Padding(6); + this.Cancel.Margin = new System.Windows.Forms.Padding(3, 3, 6, 6); this.Cancel.Name = "Cancel"; this.Cancel.Size = new System.Drawing.Size(88, 27); this.Cancel.TabIndex = 3; diff --git a/AssetStudioGUI/GameOptionsForm.Designer.cs b/AssetStudioGUI/GameOptionsForm.Designer.cs index 65f604f..243cdf6 100644 --- a/AssetStudioGUI/GameOptionsForm.Designer.cs +++ b/AssetStudioGUI/GameOptionsForm.Designer.cs @@ -191,7 +191,7 @@ this.closeButton.BackColor = System.Drawing.SystemColors.ButtonFace; this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.closeButton.Location = new System.Drawing.Point(294, 336); - this.closeButton.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.closeButton.Margin = new System.Windows.Forms.Padding(3, 3, 6, 6); this.closeButton.Name = "closeButton"; this.closeButton.Size = new System.Drawing.Size(88, 27); this.closeButton.TabIndex = 3; @@ -204,7 +204,7 @@ this.saveToDiskButton.AutoSize = true; this.saveToDiskButton.BackColor = System.Drawing.SystemColors.ButtonFace; this.saveToDiskButton.Location = new System.Drawing.Point(12, 336); - this.saveToDiskButton.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.saveToDiskButton.Margin = new System.Windows.Forms.Padding(6, 3, 3, 6); this.saveToDiskButton.Name = "saveToDiskButton"; this.saveToDiskButton.Size = new System.Drawing.Size(89, 27); this.saveToDiskButton.TabIndex = 1; @@ -218,7 +218,7 @@ this.applyButton.BackColor = System.Drawing.SystemColors.ButtonFace; this.applyButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.applyButton.Location = new System.Drawing.Point(200, 336); - this.applyButton.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.applyButton.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6); this.applyButton.Name = "applyButton"; this.applyButton.Size = new System.Drawing.Size(88, 27); this.applyButton.TabIndex = 2; @@ -235,7 +235,7 @@ this.tabControl1.Margin = new System.Windows.Forms.Padding(12); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(371, 319); + this.tabControl1.Size = new System.Drawing.Size(371, 309); this.tabControl1.TabIndex = 0; // // tabPage1 @@ -245,7 +245,7 @@ this.tabPage1.Location = new System.Drawing.Point(4, 24); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(363, 291); + this.tabPage1.Size = new System.Drawing.Size(363, 281); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "General"; // @@ -341,7 +341,7 @@ this.label1.TabIndex = 0; this.label1.Text = "Parsing mode"; // - // ImportOptionsForm + // GameOptionsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; diff --git a/AssetStudioGUI/Studio.cs b/AssetStudioGUI/Studio.cs index 39c1133..0a789b8 100644 --- a/AssetStudioGUI/Studio.cs +++ b/AssetStudioGUI/Studio.cs @@ -193,10 +193,7 @@ namespace AssetStudioGUI var filePath = Path.Combine(extractPath, file.path); var fileDirectory = Path.GetDirectoryName(filePath); - if (!Directory.Exists(fileDirectory)) - { - Directory.CreateDirectory(fileDirectory); - } + Directory.CreateDirectory(fileDirectory); if (!File.Exists(filePath)) { using (var fileStream = File.Create(filePath)) @@ -1069,7 +1066,7 @@ namespace AssetStudioGUI var mocPathDict = GenerateMocPathDict(mocDict, searchByFilename); if (!searchByFilename && mocPathDict.Count != mocDict.Count) { - Logger.Warning("Some Live2D models cannot be exported using containers\nTry to enable search by file name in the options"); + Logger.Warning("Some Live2D models cannot be exported using containers\nTry to enable search by file name in the export options"); } if (searchByFilename) diff --git a/AssetStudioGUI/StudioOptionsForm.Designer.cs b/AssetStudioGUI/StudioOptionsForm.Designer.cs index 9ab5117..07d72dc 100644 --- a/AssetStudioGUI/StudioOptionsForm.Designer.cs +++ b/AssetStudioGUI/StudioOptionsForm.Designer.cs @@ -41,12 +41,12 @@ this.cachePathResetButton = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.meshPreProcessingCheckBox = new System.Windows.Forms.CheckBox(); + this.displayAllCheckBox = new System.Windows.Forms.CheckBox(); this.parseByTypetreeCheckBox = new System.Windows.Forms.CheckBox(); + this.meshPreProcessingCheckBox = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.OKbutton = new System.Windows.Forms.Button(); this.Cancel = new System.Windows.Forms.Button(); - this.displayAllCheckBox = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.guiComponentsGroupBox.SuspendLayout(); @@ -63,7 +63,7 @@ this.tabControl1.Margin = new System.Windows.Forms.Padding(12); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(371, 333); + this.tabControl1.Size = new System.Drawing.Size(371, 327); this.tabControl1.TabIndex = 0; // // tabPage1 @@ -74,7 +74,7 @@ this.tabPage1.Location = new System.Drawing.Point(4, 24); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(363, 305); + this.tabPage1.Size = new System.Drawing.Size(363, 299); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "General"; // @@ -83,7 +83,7 @@ this.guiComponentsGroupBox.AutoSize = true; this.guiComponentsGroupBox.Controls.Add(this.buildSceneHierarchyCheckBox); this.guiComponentsGroupBox.Dock = System.Windows.Forms.DockStyle.Top; - this.guiComponentsGroupBox.Location = new System.Drawing.Point(3, 126); + this.guiComponentsGroupBox.Location = new System.Drawing.Point(3, 128); this.guiComponentsGroupBox.Name = "guiComponentsGroupBox"; this.guiComponentsGroupBox.Size = new System.Drawing.Size(357, 63); this.guiComponentsGroupBox.TabIndex = 1; @@ -92,12 +92,13 @@ // // buildSceneHierarchyCheckBox // - this.buildSceneHierarchyCheckBox.AutoSize = true; + this.buildSceneHierarchyCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.buildSceneHierarchyCheckBox.Checked = true; this.buildSceneHierarchyCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.buildSceneHierarchyCheckBox.Location = new System.Drawing.Point(6, 22); this.buildSceneHierarchyCheckBox.Name = "buildSceneHierarchyCheckBox"; - this.buildSceneHierarchyCheckBox.Size = new System.Drawing.Size(138, 19); + this.buildSceneHierarchyCheckBox.Size = new System.Drawing.Size(348, 19); this.buildSceneHierarchyCheckBox.TabIndex = 0; this.buildSceneHierarchyCheckBox.Text = "Build scene hierarchy"; this.toolTip1.SetToolTip(this.buildSceneHierarchyCheckBox, "You can disable tree structure building if you don\'t use the Scene Hierarchy tab"); @@ -114,7 +115,7 @@ this.cacheGroupBox.Dock = System.Windows.Forms.DockStyle.Top; this.cacheGroupBox.Location = new System.Drawing.Point(3, 3); this.cacheGroupBox.Name = "cacheGroupBox"; - this.cacheGroupBox.Size = new System.Drawing.Size(357, 123); + this.cacheGroupBox.Size = new System.Drawing.Size(357, 125); this.cacheGroupBox.TabIndex = 0; this.cacheGroupBox.TabStop = false; this.cacheGroupBox.Text = "Disk cache"; @@ -123,7 +124,7 @@ // this.alwaysDecompressToDiskCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.alwaysDecompressToDiskCheckBox.Location = new System.Drawing.Point(9, 82); + this.alwaysDecompressToDiskCheckBox.Location = new System.Drawing.Point(9, 84); this.alwaysDecompressToDiskCheckBox.Name = "alwaysDecompressToDiskCheckBox"; this.alwaysDecompressToDiskCheckBox.Size = new System.Drawing.Size(345, 19); this.alwaysDecompressToDiskCheckBox.TabIndex = 4; @@ -134,7 +135,7 @@ // cacheFreeSpaceLabel // this.cacheFreeSpaceLabel.AutoSize = true; - this.cacheFreeSpaceLabel.Location = new System.Drawing.Point(160, 47); + this.cacheFreeSpaceLabel.Location = new System.Drawing.Point(160, 49); this.cacheFreeSpaceLabel.Name = "cacheFreeSpaceLabel"; this.cacheFreeSpaceLabel.Size = new System.Drawing.Size(91, 15); this.cacheFreeSpaceLabel.TabIndex = 3; @@ -151,7 +152,7 @@ // // cachePathSelectButton // - this.cachePathSelectButton.Location = new System.Drawing.Point(9, 42); + this.cachePathSelectButton.Location = new System.Drawing.Point(9, 44); this.cachePathSelectButton.Name = "cachePathSelectButton"; this.cachePathSelectButton.Size = new System.Drawing.Size(60, 25); this.cachePathSelectButton.TabIndex = 1; @@ -161,7 +162,7 @@ // // cachePathResetButton // - this.cachePathResetButton.Location = new System.Drawing.Point(75, 42); + this.cachePathResetButton.Location = new System.Drawing.Point(75, 44); this.cachePathResetButton.Name = "cachePathResetButton"; this.cachePathResetButton.Size = new System.Drawing.Size(60, 25); this.cachePathResetButton.TabIndex = 2; @@ -176,7 +177,7 @@ this.tabPage2.Location = new System.Drawing.Point(4, 24); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(363, 305); + this.tabPage2.Size = new System.Drawing.Size(363, 299); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Assets"; // @@ -194,17 +195,18 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "Asset parsing"; // - // meshPreProcessingCheckBox + // displayAllCheckBox // - this.meshPreProcessingCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.displayAllCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.meshPreProcessingCheckBox.Location = new System.Drawing.Point(6, 47); - this.meshPreProcessingCheckBox.Name = "meshPreProcessingCheckBox"; - this.meshPreProcessingCheckBox.Size = new System.Drawing.Size(348, 19); - this.meshPreProcessingCheckBox.TabIndex = 2; - this.meshPreProcessingCheckBox.Text = "Pre-process Mesh assets during loading"; - this.toolTip1.SetToolTip(this.meshPreProcessingCheckBox, "Requires more RAM"); - this.meshPreProcessingCheckBox.UseVisualStyleBackColor = true; + this.displayAllCheckBox.Location = new System.Drawing.Point(6, 22); + this.displayAllCheckBox.Name = "displayAllCheckBox"; + this.displayAllCheckBox.Size = new System.Drawing.Size(348, 19); + this.displayAllCheckBox.TabIndex = 3; + this.displayAllCheckBox.Text = "Display all assets"; + this.toolTip1.SetToolTip(this.displayAllCheckBox, "Check this option will display all types assets. Not extractable assets can expor" + + "t the RAW file."); + this.displayAllCheckBox.UseVisualStyleBackColor = true; // // parseByTypetreeCheckBox // @@ -217,8 +219,22 @@ this.parseByTypetreeCheckBox.Size = new System.Drawing.Size(348, 19); this.parseByTypetreeCheckBox.TabIndex = 1; this.parseByTypetreeCheckBox.Text = "Parse assets using their typetree"; + this.toolTip1.SetToolTip(this.parseByTypetreeCheckBox, "(Applies to assets with typetree included)\r\nSlower but can parse non-standard ass" + + "ets.\r\nOnly for Texture2D, AnimationClip and Material assets for now."); this.parseByTypetreeCheckBox.UseVisualStyleBackColor = true; // + // meshPreProcessingCheckBox + // + this.meshPreProcessingCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.meshPreProcessingCheckBox.Location = new System.Drawing.Point(6, 47); + this.meshPreProcessingCheckBox.Name = "meshPreProcessingCheckBox"; + this.meshPreProcessingCheckBox.Size = new System.Drawing.Size(348, 19); + this.meshPreProcessingCheckBox.TabIndex = 2; + this.meshPreProcessingCheckBox.Text = "Pre-process Mesh assets during loading"; + this.toolTip1.SetToolTip(this.meshPreProcessingCheckBox, "Requires more RAM"); + this.meshPreProcessingCheckBox.UseVisualStyleBackColor = true; + // // OKbutton // this.OKbutton.AutoSize = true; @@ -238,7 +254,7 @@ this.Cancel.BackColor = System.Drawing.SystemColors.ButtonFace; this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.Cancel.Location = new System.Drawing.Point(295, 354); - this.Cancel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.Cancel.Margin = new System.Windows.Forms.Padding(3, 3, 6, 6); this.Cancel.Name = "Cancel"; this.Cancel.Size = new System.Drawing.Size(88, 27); this.Cancel.TabIndex = 2; @@ -246,19 +262,6 @@ this.Cancel.UseVisualStyleBackColor = false; this.Cancel.Click += new System.EventHandler(this.Cancel_Click); // - // displayAllCheckBox - // - this.displayAllCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.displayAllCheckBox.Location = new System.Drawing.Point(6, 22); - this.displayAllCheckBox.Name = "displayAllCheckBox"; - this.displayAllCheckBox.Size = new System.Drawing.Size(348, 19); - this.displayAllCheckBox.TabIndex = 3; - this.displayAllCheckBox.Text = "Display all assets"; - this.toolTip1.SetToolTip(this.displayAllCheckBox, "Check this option will display all types assets. Not extractable assets can expor" + - "t the RAW file."); - this.displayAllCheckBox.UseVisualStyleBackColor = true; - // // StudioOptionsForm // this.AcceptButton = this.OKbutton; @@ -284,7 +287,6 @@ this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); this.guiComponentsGroupBox.ResumeLayout(false); - this.guiComponentsGroupBox.PerformLayout(); this.cacheGroupBox.ResumeLayout(false); this.cacheGroupBox.PerformLayout(); this.tabPage2.ResumeLayout(false); diff --git a/AssetStudioGUI/StudioOptionsForm.cs b/AssetStudioGUI/StudioOptionsForm.cs index 4fb6a49..07b9719 100644 --- a/AssetStudioGUI/StudioOptionsForm.cs +++ b/AssetStudioGUI/StudioOptionsForm.cs @@ -49,8 +49,7 @@ namespace AssetStudioGUI private void cachePathResetButton_Click(object sender, EventArgs e) { _cachePath = Path.Combine(Directory.GetCurrentDirectory(), "temp"); - if (!Directory.Exists(_cachePath)) - Directory.CreateDirectory(_cachePath); + Directory.CreateDirectory(_cachePath); DisplayCachePath(); } diff --git a/AssetStudioGUI/StudioOptionsForm.resx b/AssetStudioGUI/StudioOptionsForm.resx index d54ad1e..df8339b 100644 --- a/AssetStudioGUI/StudioOptionsForm.resx +++ b/AssetStudioGUI/StudioOptionsForm.resx @@ -120,7 +120,4 @@ 17, 17 - - 17, 17 - \ No newline at end of file