New project name

This commit is contained in:
Perfare 2018-04-03 06:51:22 +08:00
parent 140a732046
commit 4ab513002f
104 changed files with 185 additions and 213 deletions

View File

@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.27130.2024 VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityStudio", "UnityStudio\UnityStudio.csproj", "{24551E2D-E9B6-4CD6-8F2A-D9F4A13E7853}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetStudio", "AssetStudio\AssetStudio.csproj", "{24551E2D-E9B6-4CD6-8F2A-D9F4A13E7853}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityStudio-x86", "UnityStudio\UnityStudio-x86.csproj", "{F5E07FB2-95E4-417F-943F-D439D9A03BBA}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetStudio-x86", "AssetStudio\AssetStudio-x86.csproj", "{F5E07FB2-95E4-417F-943F-D439D9A03BBA}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -8,8 +8,8 @@
<ProjectGuid>{F5E07FB2-95E4-417F-943F-D439D9A03BBA}</ProjectGuid> <ProjectGuid>{F5E07FB2-95E4-417F-943F-D439D9A03BBA}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityStudio</RootNamespace> <RootNamespace>AssetStudio</RootNamespace>
<AssemblyName>UnityStudio</AssemblyName> <AssemblyName>AssetStudio</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
@ -31,7 +31,8 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\unity.ico</ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
@ -135,6 +136,12 @@
<Compile Include="7zip\SevenZipHelper.cs"> <Compile Include="7zip\SevenZipHelper.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="AssetStudioForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AssetStudioForm.Designer.cs">
<DependentUpon>AssetStudioForm.cs</DependentUpon>
</Compile>
<Compile Include="OpenFolderDialog.cs" /> <Compile Include="OpenFolderDialog.cs" />
<Compile Include="Classes\AssetBundle.cs" /> <Compile Include="Classes\AssetBundle.cs" />
<Compile Include="Classes\MovieTexture.cs" /> <Compile Include="Classes\MovieTexture.cs" />
@ -193,12 +200,10 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StudioClasses\AssetsFile.cs" /> <Compile Include="StudioClasses\AssetsFile.cs" />
<Compile Include="StudioClasses\WebFile.cs" /> <Compile Include="StudioClasses\WebFile.cs" />
<Compile Include="UnityStudioForm.cs"> <EmbeddedResource Include="AssetStudioForm.resx">
<SubType>Form</SubType> <DependentUpon>AssetStudioForm.cs</DependentUpon>
</Compile> <SubType>Designer</SubType>
<Compile Include="UnityStudioForm.Designer.cs"> </EmbeddedResource>
<DependentUpon>UnityStudioForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="ExportOptions.resx"> <EmbeddedResource Include="ExportOptions.resx">
<DependentUpon>ExportOptions.cs</DependentUpon> <DependentUpon>ExportOptions.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -216,10 +221,6 @@
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ShaderResource.Designer.cs</LastGenOutput> <LastGenOutput>ShaderResource.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UnityStudioForm.resx">
<DependentUpon>UnityStudioForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<None Include="app.config" /> <None Include="app.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
@ -248,16 +249,13 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\unity.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\preview.png" /> <None Include="Resources\preview.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy /y "$(ProjectDir)library" "$(TargetDir)" <PostBuildEvent>xcopy /y "$(ProjectDir)Library" "$(TargetDir)"
xcopy /y "$(ProjectDir)library\$(PlatformName)" "$(TargetDir)"</PostBuildEvent> xcopy /y "$(ProjectDir)Library\$(PlatformName)" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -8,8 +8,8 @@
<ProjectGuid>{24551E2D-E9B6-4CD6-8F2A-D9F4A13E7853}</ProjectGuid> <ProjectGuid>{24551E2D-E9B6-4CD6-8F2A-D9F4A13E7853}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityStudio</RootNamespace> <RootNamespace>AssetStudio</RootNamespace>
<AssemblyName>UnityStudio</AssemblyName> <AssemblyName>AssetStudio</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
@ -31,7 +31,8 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\unity.ico</ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -193,11 +194,11 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StudioClasses\AssetsFile.cs" /> <Compile Include="StudioClasses\AssetsFile.cs" />
<Compile Include="StudioClasses\WebFile.cs" /> <Compile Include="StudioClasses\WebFile.cs" />
<Compile Include="UnityStudioForm.cs"> <Compile Include="AssetStudioForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="UnityStudioForm.Designer.cs"> <Compile Include="AssetStudioForm.Designer.cs">
<DependentUpon>UnityStudioForm.cs</DependentUpon> <DependentUpon>AssetStudioForm.cs</DependentUpon>
</Compile> </Compile>
<EmbeddedResource Include="ExportOptions.resx"> <EmbeddedResource Include="ExportOptions.resx">
<DependentUpon>ExportOptions.cs</DependentUpon> <DependentUpon>ExportOptions.cs</DependentUpon>
@ -216,13 +217,11 @@
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ShaderResource.Designer.cs</LastGenOutput> <LastGenOutput>ShaderResource.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UnityStudioForm.resx"> <EmbeddedResource Include="AssetStudioForm.resx">
<DependentUpon>UnityStudioForm.cs</DependentUpon> <DependentUpon>AssetStudioForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.config"> <None Include="app.config" />
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -250,16 +249,13 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\unity.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\preview.png" /> <None Include="Resources\preview.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy /y "$(ProjectDir)library" "$(TargetDir)" <PostBuildEvent>xcopy /y "$(ProjectDir)Library" "$(TargetDir)"
xcopy /y "$(ProjectDir)library\$(PlatformName)" "$(TargetDir)"</PostBuildEvent> xcopy /y "$(ProjectDir)Library\$(PlatformName)" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,6 +1,6 @@
namespace UnityStudio namespace AssetStudio
{ {
partial class UnityStudioForm partial class AssetStudioForm
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
@ -29,7 +29,7 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UnityStudioForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AssetStudioForm));
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -535,7 +535,7 @@
// previewPanel // previewPanel
// //
this.previewPanel.BackColor = System.Drawing.SystemColors.ControlDark; this.previewPanel.BackColor = System.Drawing.SystemColors.ControlDark;
this.previewPanel.BackgroundImage = global::UnityStudio.Properties.Resources.preview; this.previewPanel.BackgroundImage = global::AssetStudio.Properties.Resources.preview;
this.previewPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.previewPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.previewPanel.Controls.Add(this.assetInfoLabel); this.previewPanel.Controls.Add(this.assetInfoLabel);
this.previewPanel.Controls.Add(this.FMODpanel); this.previewPanel.Controls.Add(this.FMODpanel);
@ -813,7 +813,7 @@
// openFileDialog1 // openFileDialog1
// //
this.openFileDialog1.AddExtension = false; this.openFileDialog1.AddExtension = false;
this.openFileDialog1.Filter = "Unity files|*.*"; this.openFileDialog1.Filter = "All types|*.*";
this.openFileDialog1.Multiselect = true; this.openFileDialog1.Multiselect = true;
this.openFileDialog1.RestoreDirectory = true; this.openFileDialog1.RestoreDirectory = true;
// //
@ -837,21 +837,20 @@
this.showOriginalFileToolStripMenuItem.Text = "show original file"; this.showOriginalFileToolStripMenuItem.Text = "show original file";
this.showOriginalFileToolStripMenuItem.Click += new System.EventHandler(this.showOriginalFileToolStripMenuItem_Click); this.showOriginalFileToolStripMenuItem.Click += new System.EventHandler(this.showOriginalFileToolStripMenuItem_Click);
// //
// UnityStudioForm // AssetStudioForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1264, 681); this.ClientSize = new System.Drawing.Size(1264, 681);
this.Controls.Add(this.splitContainer1); this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Icon = global::UnityStudio.Properties.Resources.unity;
this.KeyPreview = true; this.KeyPreview = true;
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.MinimumSize = new System.Drawing.Size(620, 372); this.MinimumSize = new System.Drawing.Size(620, 372);
this.Name = "UnityStudioForm"; this.Name = "AssetStudioForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "UnityStudio"; this.Text = "AssetStudio";
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.UnityStudioForm_KeyDown); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.AssetStudioForm_KeyDown);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel1.ResumeLayout(false);

View File

@ -13,15 +13,15 @@ using System.Diagnostics;
using System.Drawing.Text; using System.Drawing.Text;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics.OpenGL;
using static UnityStudio.Studio; using static AssetStudio.Studio;
using static UnityStudio.FBXExporter; using static AssetStudio.FBXExporter;
using static UnityStudio.Importer; using static AssetStudio.Importer;
using static UnityStudio.Exporter; using static AssetStudio.Exporter;
using static UnityStudio.SpriteHelper; using static AssetStudio.SpriteHelper;
namespace UnityStudio namespace AssetStudio
{ {
partial class UnityStudioForm : Form partial class AssetStudioForm : Form
{ {
private AssetPreloadData lastSelectedItem; private AssetPreloadData lastSelectedItem;
private AssetPreloadData lastLoadedAsset; private AssetPreloadData lastLoadedAsset;
@ -93,18 +93,18 @@ namespace UnityStudio
var readFile = ProcessingSplitFiles(openFileDialog1.FileNames.ToList()); var readFile = ProcessingSplitFiles(openFileDialog1.FileNames.ToList());
foreach (var i in readFile) foreach (var i in readFile)
{ {
unityFiles.Add(i); importFiles.Add(i);
unityFilesHash.Add(Path.GetFileName(i).ToUpper()); importFilesHash.Add(Path.GetFileName(i).ToUpper());
} }
SetProgressBarValue(0); SetProgressBarValue(0);
SetProgressBarMaximum(unityFiles.Count); SetProgressBarMaximum(importFiles.Count);
//use a for loop because list size can change //use a for loop because list size can change
for (int f = 0; f < unityFiles.Count; f++) for (int f = 0; f < importFiles.Count; f++)
{ {
LoadFile(unityFiles[f]); LoadFile(importFiles[f]);
ProgressBarPerformStep(); ProgressBarPerformStep();
} }
unityFilesHash.Clear(); importFilesHash.Clear();
assetsfileListHash.Clear(); assetsfileListHash.Clear();
BuildAssetStrucutres(); BuildAssetStrucutres();
}); });
@ -125,18 +125,18 @@ namespace UnityStudio
var readFile = ProcessingSplitFiles(files); var readFile = ProcessingSplitFiles(files);
foreach (var i in readFile) foreach (var i in readFile)
{ {
unityFiles.Add(i); importFiles.Add(i);
unityFilesHash.Add(Path.GetFileName(i)); importFilesHash.Add(Path.GetFileName(i));
} }
SetProgressBarValue(0); SetProgressBarValue(0);
SetProgressBarMaximum(unityFiles.Count); SetProgressBarMaximum(importFiles.Count);
//use a for loop because list size can change //use a for loop because list size can change
for (int f = 0; f < unityFiles.Count; f++) for (int f = 0; f < importFiles.Count; f++)
{ {
LoadFile(unityFiles[f]); LoadFile(importFiles[f]);
ProgressBarPerformStep(); ProgressBarPerformStep();
} }
unityFilesHash.Clear(); importFilesHash.Clear();
assetsfileListHash.Clear(); assetsfileListHash.Clear();
BuildAssetStrucutres(); BuildAssetStrucutres();
}); });
@ -146,7 +146,7 @@ namespace UnityStudio
private void extractBundleToolStripMenuItem_Click(object sender, EventArgs e) private void extractBundleToolStripMenuItem_Click(object sender, EventArgs e)
{ {
OpenFileDialog openBundleDialog = new OpenFileDialog(); OpenFileDialog openBundleDialog = new OpenFileDialog();
openBundleDialog.Filter = "Unity bundle files|*.*"; openBundleDialog.Filter = "Bundle files|*.*";
openBundleDialog.FilterIndex = 1; openBundleDialog.FilterIndex = 1;
openBundleDialog.RestoreDirectory = true; openBundleDialog.RestoreDirectory = true;
openBundleDialog.Multiselect = true; openBundleDialog.Multiselect = true;
@ -203,11 +203,11 @@ namespace UnityStudio
{ {
if (productName != "") if (productName != "")
{ {
Text = $"UnityStudio - {productName} - {assetsfileList[0].m_Version} - {assetsfileList[0].platformStr}"; Text = $"AssetStudio - {productName} - {assetsfileList[0].m_Version} - {assetsfileList[0].platformStr}";
} }
else if (assetsfileList.Count > 0) else if (assetsfileList.Count > 0)
{ {
Text = $"UnityStudio - no productName - {assetsfileList[0].m_Version} - {assetsfileList[0].platformStr}"; Text = $"AssetStudio - no productName - {assetsfileList[0].m_Version} - {assetsfileList[0].platformStr}";
} }
if (!dontLoadAssetsMenuItem.Checked) if (!dontLoadAssetsMenuItem.Checked)
{ {
@ -243,7 +243,7 @@ namespace UnityStudio
})); }));
} }
private void UnityStudioForm_KeyDown(object sender, KeyEventArgs e) private void AssetStudioForm_KeyDown(object sender, KeyEventArgs e)
{ {
if (e.Control && e.Alt && e.KeyCode == Keys.D) if (e.Control && e.Alt && e.KeyCode == Keys.D)
{ {
@ -814,7 +814,7 @@ namespace UnityStudio
} }
case ClassIDReference.Font: case ClassIDReference.Font:
{ {
UnityFont m_Font = new UnityFont(asset, true); UFont m_Font = new UFont(asset, true);
if (m_Font.m_FontData != null) if (m_Font.m_FontData != null)
{ {
IntPtr data = Marshal.AllocCoTaskMem(m_Font.m_FontData.Length); IntPtr data = Marshal.AllocCoTaskMem(m_Font.m_FontData.Length);
@ -1617,7 +1617,7 @@ namespace UnityStudio
} }
} }
public UnityStudioForm() public AssetStudioForm()
{ {
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
InitializeComponent(); InitializeComponent();
@ -1786,9 +1786,9 @@ namespace UnityStudio
private void resetForm() private void resetForm()
{ {
Text = "UnityStudio"; Text = "AssetStudio";
unityFiles.Clear(); importFiles.Clear();
foreach (var assetsFile in assetsfileList) foreach (var assetsFile in assetsfileList)
{ {
assetsFile.assetsFileReader.Dispose(); assetsFile.assetsFileReader.Dispose();

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class AssetBundle class AssetBundle

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
class AudioClip class AudioClip
{ {
@ -15,7 +15,7 @@ namespace UnityStudio
public bool m_3D; public bool m_3D;
public bool m_UseHardware; public bool m_UseHardware;
//Unity 5 //version 5
public int m_LoadType; public int m_LoadType;
public int m_Channels; public int m_Channels;
public int m_Frequency; public int m_Frequency;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class BuildSettings public class BuildSettings
{ {

View File

@ -3,14 +3,14 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class UnityFont class UFont
{ {
public string m_Name; public string m_Name;
public byte[] m_FontData; public byte[] m_FontData;
public UnityFont(AssetPreloadData preloadData, bool readSwitch) public UFont(AssetPreloadData preloadData, bool readSwitch)
{ {
var sourceFile = preloadData.sourceFile; var sourceFile = preloadData.sourceFile;
var reader = preloadData.Reader; var reader = preloadData.Reader;

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public class GameObject : TreeNode public class GameObject : TreeNode
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class TexEnv class TexEnv
{ {

View File

@ -16,7 +16,7 @@ Also, rotating the axes is just that, the same handedness in a different system.
Y-up or Z-up are not requirements OR defining characteristics of a handedness, they are just common that way. Y-up or Z-up are not requirements OR defining characteristics of a handedness, they are just common that way.
Unity is left-handed with Y-up unt is left-handed with Y-up
Aircraft View Aircraft View
Y Top Y Up Y Top Y Up
| | | |
@ -69,36 +69,36 @@ PreRotation -90,0,0 to bring Original Up (FBX Z) to ViewCube Up when importing
PreRotation means only the geometry is rotated locally around pivot before applying other modifiers. It is "invisible" to the user. PreRotation means only the geometry is rotated locally around pivot before applying other modifiers. It is "invisible" to the user.
Importing FBX in Unity, Axis settings and PreRotations are ignored. Importing FBX in Unt, Axis settings and PreRotations are ignored.
They probably ignore them because the order of vertex components is always the same in FBX, and Unity axes never change orientation (as opposed to Max-Maya). They probably ignore them because the order of vertex components is always the same in FBX, and Unt axes never change orientation (as opposed to Max-Maya).
Vertex components are loaded as follows: Vertex components are loaded as follows:
Unity Up(Y) = FBX Y Unt Up(Y) = FBX Y
Unity Front(Z) = FBX Z Unt Front(Z) = FBX Z
Unity Left(X) = FBX -X Unt Left(X) = FBX -X
Technically, this is a correct handedness conversion, but to a different system, because the model is not properly oriented (plane nose is down). Technically, this is a correct handedness conversion, but to a different system, because the model is not properly oriented (plane nose is down).
So Unity adds a -90 degree rotation, similar to the FBX PreRotation, to bring the nose to Front(Z). So Unt adds a -90 degree rotation, similar to the FBX PreRotation, to bring the nose to Front(Z).
Except it does it as a regular rotation, and combines it with any other rotations in the Transform asset. Except it does it as a regular rotation, and combines it with any other rotations in the Transform asset.
Converting from Unity back to FBX, the same vertex conversion cannot be applied because we have to take into account the rotation. Converting from Unt back to FBX, the same vertex conversion cannot be applied because we have to take into account the rotation.
Option 0: export vertices and transformations as -X,Y,Z and set FBX option to Y-up without PreRotation! Option 0: export vertices and transformations as -X,Y,Z and set FBX option to Y-up without PreRotation!
the result will be Max Z = FBX Y, Max -Y = FBX Z, Max X = FBX X => final order -X -Z Y the result will be Max Z = FBX Y, Max -Y = FBX Z, Max X = FBX X => final order -X -Z Y
Option 1: export vertices and transformations as -X,-Z,Y and set FBX options as "Z-up". Option 1: export vertices and transformations as -X,-Z,Y and set FBX options as "Z-up".
The -90 rotation exported from Unity will bring the model in correct orientation. The -90 rotation exported from Unt will bring the model in correct orientation.
Option 2: export vertices and transformations as -X,-Y,-Z, add -90 PreRotation to every Mesh Node and set FBX options as "Y-up". Option 2: export vertices and transformations as -X,-Y,-Z, add -90 PreRotation to every Mesh Node and set FBX options as "Y-up".
The -90 rotation from Unity plus the -90 PreRotation will bring the model in correct orientation. The -90 rotation from Unt plus the -90 PreRotation will bring the model in correct orientation.
Remember though that the PreRotation is baked into the Geometry. Remember though that the PreRotation is baked into the Geometry.
But since the -90 rotation from Unity is a regular type, it will show up in the modifier in both cases. But since the -90 rotation from Unt is a regular type, it will show up in the modifier in both cases.
Also, re-importing this FBX in Unity will now produce a (-90)+(-90)=-180 rotation. Also, re-importing this FBX in Unt will now produce a (-90)+(-90)=-180 rotation.
This is an unfortunate eyesore, but nothing more, the orientation will be fine. This is an unfortunate eyesore, but nothing more, the orientation will be fine.
In theory, one could add +90 degrees rotation to GameObjects that link to Mesh assets (but not other types) to cancel out the Unity rotation. In theory, one could add +90 degrees rotation to GameObjects that link to Mesh assets (but not other types) to cancel out the Unt rotation.
The problem is you can never know where the Unity mesh originated from. If it came from a left-handed format such as OBJ, there wouldn't have been any conversion and it wouldn't have that -90 degree adjustment. The problem is you can never know where the Unt mesh originated from. If it came from a left-handed format such as OBJ, there wouldn't have been any conversion and it wouldn't have that -90 degree adjustment.
So it would "fix" meshes that were originally sourced form FBX, but would still have the "extra" rotation in mehses sourced from left-handed formats. So it would "fix" meshes that were originally sourced form FBX, but would still have the "extra" rotation in mehses sourced from left-handed formats.
*/ */
namespace UnityStudio namespace AssetStudio
{ {
public class Mesh public class Mesh
{ {
@ -469,7 +469,7 @@ namespace UnityStudio
bool m_KeepIndices = reader.ReadBoolean(); bool m_KeepIndices = reader.ReadBoolean();
} }
reader.AlignStream(4); reader.AlignStream(4);
//This is a Unity bug fixed in 2017.3.1p1 and later versions //This is a bug fixed in 2017.3.1p1 and later versions
if ((version[0] > 2017 || (version[0] == 2017 && version[1] >= 4)) || //2017.4 if ((version[0] > 2017 || (version[0] == 2017 && version[1] >= 4)) || //2017.4
((version[0] == 2017 && version[1] == 3 && version[2] == 1) && MeshPD.sourceFile.buildType[0] == "p") || //fixed after 2017.3.1px ((version[0] == 2017 && version[1] == 3 && version[2] == 1) && MeshPD.sourceFile.buildType[0] == "p") || //fixed after 2017.3.1px
((version[0] == 2017 && version[1] == 3) && m_MeshCompression == 0))//2017.3.xfx with no compression ((version[0] == 2017 && version[1] == 3) && m_MeshCompression == 0))//2017.3.xfx with no compression
@ -595,7 +595,7 @@ namespace UnityStudio
BitArray m_CurrentChannels = new BitArray(new int[1] { reader.ReadInt32() }); BitArray m_CurrentChannels = new BitArray(new int[1] { reader.ReadInt32() });
m_VertexCount = reader.ReadInt32(); m_VertexCount = reader.ReadInt32();
//int singleStreamStride = 0;//used tor unity 5 //int singleStreamStride = 0;//used tor version 5
int streamCount = 0; int streamCount = 0;
#region streams for 3.5.0 - 3.5.7 #region streams for 3.5.0 - 3.5.7
@ -631,7 +631,7 @@ namespace UnityStudio
m_Channels[c].format = reader.ReadByte(); m_Channels[c].format = reader.ReadByte();
m_Channels[c].dimension = reader.ReadByte(); m_Channels[c].dimension = reader.ReadByte();
//calculate stride for Unity 5 //calculate stride for version 5
//singleStreamStride += m_Channels[c].dimension * (4 / (int)Math.Pow(2, m_Channels[c].format)); //singleStreamStride += m_Channels[c].dimension * (4 / (int)Math.Pow(2, m_Channels[c].format));
if (m_Channels[c].stream >= streamCount) { streamCount = m_Channels[c].stream + 1; } if (m_Channels[c].stream >= streamCount) { streamCount = m_Channels[c].stream + 1; }
@ -716,7 +716,7 @@ namespace UnityStudio
//in the future, try to use only m_CurrentChannels //in the future, try to use only m_CurrentChannels
if ((version[0] < 5 && m_Stream.channelMask.Get(b)) || (version[0] >= 5 && m_CurrentChannels.Get(b))) if ((version[0] < 5 && m_Stream.channelMask.Get(b)) || (version[0] >= 5 && m_CurrentChannels.Get(b)))
{ {
// in Unity 4.x the colors channel has 1 dimension, as in 1 color with 4 components // in version 4.x the colors channel has 1 dimension, as in 1 color with 4 components
if (b == 2 && m_Channel.format == 2) { m_Channel.dimension = 4; } if (b == 2 && m_Channel.format == 2) { m_Channel.dimension = 4; }
componentByteSize = 4 / (int)Math.Pow(2, m_Channel.format); componentByteSize = 4 / (int)Math.Pow(2, m_Channel.format);
@ -781,7 +781,7 @@ namespace UnityStudio
foreach (var m_Stream in m_Streams) foreach (var m_Stream in m_Streams)
{ {
//a stream may have multiple vertex components but without channels there are no offsets, so I assume all vertex properties are in order //a stream may have multiple vertex components but without channels there are no offsets, so I assume all vertex properties are in order
//Unity 3.5.x only uses floats, and that's probably why channels were introduced in Unity 4 //version 3.5.x only uses floats, and that's probably why channels were introduced in version 4
ChannelInfo m_Channel = new ChannelInfo();//create my own channel so I can use the same methods ChannelInfo m_Channel = new ChannelInfo();//create my own channel so I can use the same methods
m_Channel.offset = 0; m_Channel.offset = 0;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class MeshFilter public class MeshFilter
{ {

View File

@ -3,13 +3,13 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class MeshRenderer class MeshRenderer
{ {
public PPtr m_GameObject; public PPtr m_GameObject;
public bool m_Enabled; public bool m_Enabled;
public byte m_CastShadows; //bool prior to Unity 5 public byte m_CastShadows; //bool prior to version 5
public bool m_ReceiveShadows; public bool m_ReceiveShadows;
public ushort m_LightmapIndex; public ushort m_LightmapIndex;
public ushort m_LightmapIndexDynamic; public ushort m_LightmapIndexDynamic;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class MonoBehaviour class MonoBehaviour
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class MovieTexture class MovieTexture
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class PlayerSettings public class PlayerSettings
{ {
@ -48,7 +48,7 @@ namespace UnityStudio
else if (sourceFile.version[0] == 3 && sourceFile.version[1] <= 4) { } else if (sourceFile.version[0] == 3 && sourceFile.version[1] <= 4) { }
else { int accelerometerFrequency = reader.ReadInt32(); }//3.5.0 and up else { int accelerometerFrequency = reader.ReadInt32(); }//3.5.0 and up
} }
//fail in Unity 5 beta //fail in version 5 beta
companyName = reader.ReadAlignedString(reader.ReadInt32()); companyName = reader.ReadAlignedString(reader.ReadInt32());
productName = reader.ReadAlignedString(reader.ReadInt32()); productName = reader.ReadAlignedString(reader.ReadInt32());
} }

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class RectTransform public class RectTransform
{ {

View File

@ -6,7 +6,7 @@ using System.Text;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using Lz4; using Lz4;
namespace UnityStudio namespace AssetStudio
{ {
class Shader class Shader
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class SkinnedMeshRenderer public class SkinnedMeshRenderer
{ {
@ -107,7 +107,7 @@ namespace UnityStudio
if (version[0] == 2 && version[1] < 6) if (version[0] == 2 && version[1] < 6)
{ {
//this would be the only error if mainVersion is not read in time for a unity 2.x game //this would be the only error if mainVersion is not read in time for a version 2.x game
PPtr m_DisableAnimationWhenOffscreen = sourceFile.ReadPPtr(); PPtr m_DisableAnimationWhenOffscreen = sourceFile.ReadPPtr();
} }

View File

@ -4,7 +4,7 @@ using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class Sprite class Sprite
{ {

View File

@ -4,7 +4,7 @@ using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class SpriteAtlas class SpriteAtlas
{ {

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
class TextAsset class TextAsset
{ {

View File

@ -7,7 +7,7 @@ using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
partial class Texture2D partial class Texture2D
{ {

View File

@ -6,7 +6,7 @@ using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
partial class Texture2D partial class Texture2D
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public class Transform public class Transform
{ {

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
class VideoClip class VideoClip
{ {

View File

@ -1,4 +1,4 @@
namespace UnityStudio namespace AssetStudio
{ {
partial class ExportOptions partial class ExportOptions
{ {

View File

@ -8,7 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public partial class ExportOptions : Form public partial class ExportOptions : Form
{ {

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public class GOHierarchy : TreeView public class GOHierarchy : TreeView
{ {

View File

@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
class OpenFolderDialog class OpenFolderDialog
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
static class Program static class Program
{ {
@ -15,7 +15,7 @@ namespace UnityStudio
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new UnityStudioForm()); Application.Run(new AssetStudioForm());
} }
} }
} }

View File

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("UnityStudio")] [assembly: AssemblyTitle("AssetStudio")]
[assembly: AssemblyDescription("UnityStudio is a tool for exploring, extracting and exporting assets from Unity games and apps. It has been tested with Unity builds from most platforms, ranging from Web, PC, Linux, MacOS to Xbox360, PS3, Android and iOS, and it is currently maintained to be compatible with Unity builds from 2.5 up to the 2017.3 version.")] [assembly: AssemblyDescription("AssetStudio is a tool for exploring, extracting and exporting assets and assetBundles.")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UnityStudio")] [assembly: AssemblyProduct("AssetStudio")]
[assembly: AssemblyCopyright("")] [assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace UnityStudio.Properties { namespace AssetStudio.Properties {
using System; using System;
@ -39,7 +39,7 @@ namespace UnityStudio.Properties {
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UnityStudio.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AssetStudio.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
@ -127,16 +127,6 @@ namespace UnityStudio.Properties {
} }
} }
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon unity {
get {
object obj = ResourceManager.GetObject("unity", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// 查找类似 #version 140 /// 查找类似 #version 140
/// ///

View File

@ -162,9 +162,6 @@ void main()
<data name="preview" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="preview" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\preview.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\preview.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="unity" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\unity.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="vs" xml:space="preserve"> <data name="vs" xml:space="preserve">
<value>#version 140 <value>#version 140

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace UnityStudio.Properties { namespace AssetStudio.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Unity_Studio.Properties" GeneratedClassName="Settings"> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AssetStudio.Properties" GeneratedClassName="Settings">
<Profiles /> <Profiles />
<Settings> <Settings>
<Setting Name="displayAll" Type="System.Boolean" Scope="User"> <Setting Name="displayAll" Type="System.Boolean" Scope="User">

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public class AssetPreloadData : ListViewItem public class AssetPreloadData : ListViewItem
{ {

View File

@ -6,7 +6,7 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public class AssetsFile public class AssetsFile
{ {
@ -27,7 +27,7 @@ namespace UnityStudio
public Dictionary<long, Transform> TransformList = new Dictionary<long, Transform>(); public Dictionary<long, Transform> TransformList = new Dictionary<long, Transform>();
public List<AssetPreloadData> exportableAssets = new List<AssetPreloadData>(); public List<AssetPreloadData> exportableAssets = new List<AssetPreloadData>();
public List<UnityShared> sharedAssetsList = new List<UnityShared> { new UnityShared() }; public List<SharedAssets> sharedAssetsList = new List<SharedAssets> { new SharedAssets() };
public SortedDictionary<int, ClassStruct> ClassStructures = new SortedDictionary<int, ClassStruct>(); public SortedDictionary<int, ClassStruct> ClassStructures = new SortedDictionary<int, ClassStruct>();
@ -142,7 +142,7 @@ namespace UnityStudio
}; };
#endregion #endregion
public class UnityShared public class SharedAssets
{ {
public int Index = -2; //-2 - Prepare, -1 - Missing public int Index = -2; //-2 - Prepare, -1 - Missing
public string aName = ""; public string aName = "";
@ -206,7 +206,7 @@ namespace UnityStudio
} }
default: default:
{ {
//MessageBox.Show("Unsupported Unity version!" + fileGen, "UnityStudio Error", MessageBoxButtons.OK, MessageBoxIcon.Error); //MessageBox.Show("Unsupported version!" + fileGen, "AssetStudio Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
} }
@ -309,7 +309,7 @@ namespace UnityStudio
preloadTable.Add(asset.m_PathID, asset); preloadTable.Add(asset.m_PathID, asset);
#region read BuildSettings to get version for unity 2.x files #region read BuildSettings to get version for version 2.x files
if (asset.Type == ClassIDReference.BuildSettings && fileGen == 6) if (asset.Type == ClassIDReference.BuildSettings && fileGen == 6)
{ {
long nextAsset = assetsFileReader.Position; long nextAsset = assetsFileReader.Position;
@ -347,7 +347,7 @@ namespace UnityStudio
int sharedFileCount = assetsFileReader.ReadInt32(); int sharedFileCount = assetsFileReader.ReadInt32();
for (int i = 0; i < sharedFileCount; i++) for (int i = 0; i < sharedFileCount; i++)
{ {
var shared = new UnityShared(); var shared = new SharedAssets();
shared.aName = assetsFileReader.ReadStringToNull(); shared.aName = assetsFileReader.ReadStringToNull();
assetsFileReader.Position += 20; assetsFileReader.Position += 20;
var sharedFilePath = assetsFileReader.ReadStringToNull(); //relative path var sharedFilePath = assetsFileReader.ReadStringToNull(); //relative path

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace UnityStudio namespace AssetStudio
{ {
public enum BuildTarget public enum BuildTarget
{ {

View File

@ -3,7 +3,7 @@ using System.IO;
using Lz4; using Lz4;
using SevenZip.Compression.LZMA; using SevenZip.Compression.LZMA;
namespace UnityStudio namespace AssetStudio
{ {
public class MemoryFile public class MemoryFile
{ {

View File

@ -1,4 +1,4 @@
namespace UnityStudio namespace AssetStudio
{ {
public enum ClassIDReference public enum ClassIDReference
{ {

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace UnityStudio namespace AssetStudio
{ {
public class ClassMember public class ClassMember
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;
namespace UnityStudio namespace AssetStudio
{ {
public enum EndianType public enum EndianType
{ {

View File

@ -5,9 +5,9 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using static UnityStudio.SpriteHelper; using static AssetStudio.SpriteHelper;
namespace UnityStudio namespace AssetStudio
{ {
static class Exporter static class Exporter
{ {
@ -156,7 +156,7 @@ namespace UnityStudio
public static bool ExportFont(AssetPreloadData asset, string exportPath) public static bool ExportFont(AssetPreloadData asset, string exportPath)
{ {
var m_Font = new UnityFont(asset, true); var m_Font = new UFont(asset, true);
if (m_Font.m_FontData != null) if (m_Font.m_FontData != null)
{ {
var exportFullName = exportPath + asset.Text + asset.extension; var exportFullName = exportPath + asset.Text + asset.extension;

View File

@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using static UnityStudio.Studio; using static AssetStudio.Studio;
using static UnityStudio.Exporter; using static AssetStudio.Exporter;
namespace UnityStudio namespace AssetStudio
{ {
static class FBXExporter static class FBXExporter
{ {
@ -281,7 +281,7 @@ namespace UnityStudio
fbx.Append("\n\t\tMinute: " + timestamp.Minute); fbx.Append("\n\t\tMinute: " + timestamp.Minute);
fbx.Append("\n\t\tSecond: " + timestamp.Second); fbx.Append("\n\t\tSecond: " + timestamp.Second);
fbx.Append("\n\t\tMillisecond: " + timestamp.Millisecond); fbx.Append("\n\t\tMillisecond: " + timestamp.Millisecond);
fbx.Append("\n\t}\n\tCreator: \"UnityStudio by Chipicao\"\n}\n"); fbx.Append("\n\t}\n\tCreator: \"AssetStudio by Chipicao\"\n}\n");
fbx.Append("\nGlobalSettings: {"); fbx.Append("\nGlobalSettings: {");
fbx.Append("\n\tVersion: 1000"); fbx.Append("\n\tVersion: 1000");

View File

@ -4,14 +4,14 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using static UnityStudio.Studio; using static AssetStudio.Studio;
namespace UnityStudio namespace AssetStudio
{ {
static class Importer static class Importer
{ {
public static List<string> unityFiles = new List<string>(); //files to load public static List<string> importFiles = new List<string>(); //files to load
public static HashSet<string> unityFilesHash = new HashSet<string>(); //to improve the loading speed public static HashSet<string> importFilesHash = new HashSet<string>(); //to improve the loading speed
public static HashSet<string> assetsfileListHash = new HashSet<string>(); //to improve the loading speed public static HashSet<string> assetsfileListHash = new HashSet<string>(); //to improve the loading speed
public static void LoadFile(string fullName) public static void LoadFile(string fullName)
@ -69,7 +69,7 @@ namespace UnityStudio
var sharedFilePath = Path.GetDirectoryName(fullName) + "\\" + sharedFile.fileName; var sharedFilePath = Path.GetDirectoryName(fullName) + "\\" + sharedFile.fileName;
var sharedFileName = sharedFile.fileName; var sharedFileName = sharedFile.fileName;
if (!unityFilesHash.Contains(sharedFileName.ToUpper())) if (!importFilesHash.Contains(sharedFileName.ToUpper()))
{ {
if (!File.Exists(sharedFilePath)) if (!File.Exists(sharedFilePath))
{ {
@ -82,8 +82,8 @@ namespace UnityStudio
if (File.Exists(sharedFilePath)) if (File.Exists(sharedFilePath))
{ {
unityFiles.Add(sharedFilePath); importFiles.Add(sharedFilePath);
unityFilesHash.Add(sharedFileName.ToUpper()); importFilesHash.Add(sharedFileName.ToUpper());
value++; value++;
} }
} }

View File

@ -2,9 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using static UnityStudio.Studio; using static AssetStudio.Studio;
namespace UnityStudio namespace AssetStudio
{ {
public class PPtr public class PPtr
{ {

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace UnityStudio { namespace AssetStudio {
using System; using System;
@ -39,7 +39,7 @@ namespace UnityStudio {
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UnityStudio.StudioClasses.ShaderResource", typeof(ShaderResource).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AssetStudio.StudioClasses.ShaderResource", typeof(ShaderResource).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

@ -5,9 +5,9 @@ using System.Drawing.Drawing2D;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using static UnityStudio.Studio; using static AssetStudio.Studio;
namespace UnityStudio namespace AssetStudio
{ {
static class SpriteHelper static class SpriteHelper
{ {

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace UnityStudio namespace AssetStudio
{ {
public static class StringExtensions public static class StringExtensions
{ {

View File

@ -4,7 +4,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
namespace UnityStudio namespace AssetStudio
{ {
internal static class Studio internal static class Studio
{ {
@ -142,7 +142,7 @@ namespace UnityStudio
} }
case ClassIDReference.Font: case ClassIDReference.Font:
{ {
UnityFont m_Font = new UnityFont(asset, false); UFont m_Font = new UFont(asset, false);
exportable = true; exportable = true;
break; break;
} }

View File

@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using BrotliSharpLib; using BrotliSharpLib;
namespace UnityStudio namespace AssetStudio
{ {
public class WebFile public class WebFile
{ {
@ -37,7 +37,7 @@ namespace UnityStudio
stream.Position = 0; stream.Position = 0;
using (reader = new EndianBinaryReader(stream, EndianType.LittleEndian)) using (reader = new EndianBinaryReader(stream, EndianType.LittleEndian))
{ {
ReadUnityWebData(reader); ReadWebData(reader);
} }
} }
else else
@ -52,18 +52,18 @@ namespace UnityStudio
var stream = new MemoryStream(uncompressedData); var stream = new MemoryStream(uncompressedData);
using (reader = new EndianBinaryReader(stream, EndianType.LittleEndian)) using (reader = new EndianBinaryReader(stream, EndianType.LittleEndian))
{ {
ReadUnityWebData(reader); ReadWebData(reader);
} }
} }
else else
{ {
reader.endian = EndianType.LittleEndian; reader.endian = EndianType.LittleEndian;
ReadUnityWebData(reader); ReadWebData(reader);
} }
} }
} }
private void ReadUnityWebData(EndianBinaryReader reader) private void ReadWebData(EndianBinaryReader reader)
{ {
var signature = reader.ReadStringToNull(); var signature = reader.ReadStringToNull();
if (signature != "UnityWebData1.0") if (signature != "UnityWebData1.0")

Some files were not shown because too many files have changed in this diff Show More