mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Unity 5 support
This commit is contained in:
parent
ee040bdd71
commit
66fa804819
@ -14,13 +14,11 @@ namespace Unity_Studio
|
||||
public int Type1;
|
||||
public ushort Type2;
|
||||
|
||||
//public string m_Name = "";
|
||||
public string TypeString;
|
||||
public int exportSize;
|
||||
public string InfoText;
|
||||
|
||||
public AssetsFile sourceFile;
|
||||
public int specificIndex = -1; //index in specific asset list
|
||||
public string uniqueID;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Diagnostics; //remove this later
|
||||
//using System.Diagnostics; //remove this later
|
||||
|
||||
namespace Unity_Studio
|
||||
{
|
||||
@ -19,15 +19,15 @@ namespace Unity_Studio
|
||||
//public EndianType endianType = EndianType.BigEndian;
|
||||
//public List<AssetPreloadData> preloadTable = new List<AssetPreloadData>();
|
||||
public Dictionary<long, AssetPreloadData> preloadTable = new Dictionary<long, AssetPreloadData>();
|
||||
public List<GameObject> GameObjectList = new List<GameObject>();
|
||||
public List<Transform> TransformList = new List<Transform>();
|
||||
//public List<RectTransform> RectTransformList = new List<RectTransform>();
|
||||
//public List<MeshFilter> MeshFilterList = new List<MeshFilter>();
|
||||
//public List<SkinnedMeshRenderer> SkinnedMeshList = new List<SkinnedMeshRenderer>();
|
||||
public Dictionary<long, GameObject> GameObjectList = new Dictionary<long, GameObject>();
|
||||
public Dictionary<long, Transform> TransformList = new Dictionary<long, Transform>();
|
||||
|
||||
public List<AssetPreloadData> exportableAssets = new List<AssetPreloadData>();
|
||||
public List<UnityShared> sharedAssetsList = new List<UnityShared>() {new UnityShared()};
|
||||
private ClassIDReference UnityClassID = new ClassIDReference();
|
||||
|
||||
public SortedDictionary<int, ClassStrStruct> ClassStructures = new SortedDictionary<int, ClassStrStruct>();
|
||||
|
||||
private bool baseDefinitions = false;
|
||||
|
||||
public class UnityShared
|
||||
@ -58,7 +58,7 @@ namespace Unity_Studio
|
||||
a_Stream.Position += 1;
|
||||
break;
|
||||
}
|
||||
case 7://beta
|
||||
case 7://Unity 3 beta
|
||||
{
|
||||
a_Stream.Position = (dataEnd - tableSize);
|
||||
a_Stream.Position += 1;
|
||||
@ -81,7 +81,7 @@ namespace Unity_Studio
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
case 15://not fully tested!s
|
||||
case 15://not fully tested!
|
||||
{
|
||||
a_Stream.Position += 4;//azero
|
||||
m_Version = a_Stream.ReadStringToNull();
|
||||
@ -125,8 +125,18 @@ namespace Unity_Studio
|
||||
{
|
||||
if (fileGen < 14)
|
||||
{
|
||||
int baseType = a_Stream.ReadInt32();
|
||||
readBase();
|
||||
int classID = a_Stream.ReadInt32();
|
||||
string baseType = a_Stream.ReadStringToNull();
|
||||
string baseName = a_Stream.ReadStringToNull();
|
||||
a_Stream.Position += 20;
|
||||
int memberCount = a_Stream.ReadInt32();
|
||||
|
||||
StringBuilder cb = new StringBuilder();
|
||||
for (int m = 0; m < memberCount; m++) { readBase(cb, 1); }
|
||||
|
||||
var aClass = new ClassStrStruct() { ID = classID, Text = (baseType + " " + baseName), members = cb.ToString() };
|
||||
aClass.SubItems.Add(classID.ToString());
|
||||
ClassStructures.Add(classID, aClass);
|
||||
}
|
||||
else { readBase5(); }
|
||||
}
|
||||
@ -134,12 +144,15 @@ namespace Unity_Studio
|
||||
if (fileGen >= 7 && fileGen < 14) {a_Stream.Position += 4;}//azero
|
||||
|
||||
int assetCount = a_Stream.ReadInt32();
|
||||
if (fileGen >= 14) { a_Stream.AlignStream(4); }
|
||||
|
||||
|
||||
#region asset preload table
|
||||
string assetIDfmt = "D" + assetCount.ToString().Length.ToString(); //format for unique ID
|
||||
|
||||
for (int i = 0; i < assetCount; i++)
|
||||
{
|
||||
//each table entry is aligned individually, not the whole table
|
||||
if (fileGen >= 14) { a_Stream.AlignStream(4); }
|
||||
|
||||
AssetPreloadData asset = new AssetPreloadData();
|
||||
if (fileGen < 14) { asset.m_PathID = a_Stream.ReadInt32(); }
|
||||
else { asset.m_PathID = a_Stream.ReadInt64(); }
|
||||
@ -149,7 +162,17 @@ namespace Unity_Studio
|
||||
asset.Type1 = a_Stream.ReadInt32();
|
||||
asset.Type2 = a_Stream.ReadUInt16();
|
||||
a_Stream.Position += 2;
|
||||
if (fileGen >= 15) { int azero = a_Stream.ReadInt32(); }
|
||||
if (fileGen >= 15)
|
||||
{
|
||||
byte unknownByte = a_Stream.ReadByte();
|
||||
//this is a single byte, not an int32
|
||||
//the next entry is aligned after this
|
||||
//but not the last!
|
||||
if (unknownByte != 0)
|
||||
{
|
||||
bool investigate = true;
|
||||
}
|
||||
}
|
||||
|
||||
asset.TypeString = asset.Type2.ToString();
|
||||
if (UnityClassID.Names[asset.Type2] != null)
|
||||
@ -164,7 +187,7 @@ namespace Unity_Studio
|
||||
|
||||
preloadTable.Add(asset.m_PathID, asset);
|
||||
|
||||
//this should be among the first nodes in mainData and it contains the version - useful for unity 2.x files
|
||||
#region read BuildSettings to get version for unity 2.x files
|
||||
if (asset.Type2 == 141 && fileGen == 6)
|
||||
{
|
||||
long nextAsset = a_Stream.Position;
|
||||
@ -174,16 +197,24 @@ namespace Unity_Studio
|
||||
|
||||
a_Stream.Position = nextAsset;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
buildType = m_Version.Split(new string[] { ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] strver = (m_Version.Split(new string[] { ".", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\n" }, StringSplitOptions.RemoveEmptyEntries));
|
||||
version = Array.ConvertAll(strver, int.Parse);
|
||||
|
||||
if (fileGen >= 14)
|
||||
{
|
||||
//this looks like a list of assets that need to be preloaded in memory before anytihng else
|
||||
int someCount = a_Stream.ReadInt32();
|
||||
a_Stream.Position += someCount * 12;
|
||||
for (int i = 0; i < someCount; i++)
|
||||
{
|
||||
int num1 = a_Stream.ReadInt32();
|
||||
a_Stream.AlignStream(4);
|
||||
long m_PathID = a_Stream.ReadInt64();
|
||||
}
|
||||
}
|
||||
|
||||
int sharedFileCount = a_Stream.ReadInt32();
|
||||
@ -198,20 +229,28 @@ namespace Unity_Studio
|
||||
}
|
||||
}
|
||||
|
||||
private void readBase()
|
||||
private void readBase(StringBuilder cb, int level)
|
||||
{
|
||||
string baseFormat = a_Stream.ReadStringToNull();
|
||||
string baseName = a_Stream.ReadStringToNull();
|
||||
a_Stream.Position += 20;
|
||||
string varType = a_Stream.ReadStringToNull();
|
||||
string varName = a_Stream.ReadStringToNull();
|
||||
//a_Stream.Position += 20;
|
||||
int size = a_Stream.ReadInt32();
|
||||
int index = a_Stream.ReadInt32();
|
||||
int isArray = a_Stream.ReadInt32();
|
||||
int num0 = a_Stream.ReadInt32();
|
||||
int num1 = a_Stream.ReadInt16();
|
||||
int num2 = a_Stream.ReadInt16();
|
||||
int childrenCount = a_Stream.ReadInt32();
|
||||
|
||||
//Debug.WriteLine(baseFormat + " " + baseName + " " + childrenCount);
|
||||
for (int i = 0; i < childrenCount; i++) { readBase(); }
|
||||
cb.AppendFormat("{0}{1} {2} {3}\r\n", (new string('\t', level)), varType, varName, size);
|
||||
for (int i = 0; i < childrenCount; i++) { readBase(cb, level + 1); }
|
||||
}
|
||||
|
||||
private void readBase5()
|
||||
{
|
||||
int baseType = a_Stream.ReadInt32();
|
||||
if (baseType < 0) { a_Stream.Position += 16; }
|
||||
int classID = a_Stream.ReadInt32();
|
||||
if (classID < 0) { a_Stream.Position += 16; }
|
||||
a_Stream.Position += 16;
|
||||
|
||||
if (baseDefinitions)
|
||||
@ -281,8 +320,10 @@ namespace Unity_Studio
|
||||
|
||||
a_Stream.Position += varCount * 24;
|
||||
string varStrings = Encoding.UTF8.GetString(a_Stream.ReadBytes(stringSize));
|
||||
string className = "";
|
||||
StringBuilder classVarStr = new StringBuilder();
|
||||
|
||||
//can skip this
|
||||
//build Class Structures
|
||||
a_Stream.Position -= varCount * 24 + stringSize;
|
||||
for (int i = 0; i < varCount; i++)
|
||||
{
|
||||
@ -308,11 +349,19 @@ namespace Unity_Studio
|
||||
int index = a_Stream.ReadInt32();
|
||||
int num1 = a_Stream.ReadInt32();
|
||||
|
||||
for (int t = 0; t < level; t++) { Debug.Write("\t"); }
|
||||
Debug.WriteLine(varTypeStr + " " + varNameStr + " " + size);
|
||||
if (index == 0) { className = varTypeStr + " " + varNameStr; }
|
||||
else { classVarStr.AppendFormat("{0}{1} {2} {3}\r\n", (new string('\t', level)), varTypeStr, varNameStr, size); }
|
||||
|
||||
//for (int t = 0; t < level; t++) { Debug.Write("\t"); }
|
||||
//Debug.WriteLine(varTypeStr + " " + varNameStr + " " + size);
|
||||
}
|
||||
a_Stream.Position += stringSize;
|
||||
|
||||
var aClass = new ClassStrStruct() { ID = classID, Text = className, members = classVarStr.ToString() };
|
||||
aClass.SubItems.Add(classID.ToString());
|
||||
ClassStructures.Add(classID, aClass);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,10 +2,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Unity_Studio
|
||||
{
|
||||
class ClassIDReference
|
||||
public class ClassStrStruct : ListViewItem
|
||||
{
|
||||
public int ID;
|
||||
public string members;
|
||||
}
|
||||
|
||||
public class ClassIDReference
|
||||
{
|
||||
public string[] Names = new string[1121];
|
||||
|
||||
|
@ -48,8 +48,17 @@ namespace Unity_Studio
|
||||
|
||||
if (sourceFile.version[0] > 4 || (sourceFile.version[0] == 4 && sourceFile.version[1] >= 3)) { m_CustomRenderQueue = a_Stream.ReadInt32(); }
|
||||
|
||||
//m_SavedProperties
|
||||
m_TexEnvs = new TexEnv[a_Stream.ReadInt32()];
|
||||
if (sourceFile.version[0] == 5 && sourceFile.version[1] >= 1)
|
||||
{
|
||||
string[][] stringTagMap = new string[a_Stream.ReadInt32()][];
|
||||
for (int i = 0; i < stringTagMap.Length; i++)
|
||||
{
|
||||
stringTagMap[i] = new string[2] { a_Stream.ReadAlignedString(a_Stream.ReadInt32()), a_Stream.ReadAlignedString(a_Stream.ReadInt32()) };
|
||||
}
|
||||
}
|
||||
|
||||
//m_SavedProperties
|
||||
m_TexEnvs = new TexEnv[a_Stream.ReadInt32()];
|
||||
for (int i = 0; i < m_TexEnvs.Length; i++)
|
||||
{
|
||||
TexEnv m_TexEnv = new TexEnv()
|
||||
|
@ -334,6 +334,10 @@ namespace Unity_Studio
|
||||
}
|
||||
|
||||
m_Name = a_Stream.ReadAlignedString(a_Stream.ReadInt32());
|
||||
if (m_Name == "holotable_glow_mesh")
|
||||
{
|
||||
bool stop = true;
|
||||
}
|
||||
if (version[0] < 3 || (version[0] == 3 && version[1] < 5))
|
||||
{
|
||||
m_Use16BitIndices = a_Stream.ReadBoolean();
|
||||
@ -781,6 +785,7 @@ namespace Unity_Studio
|
||||
m_UV_Packed.m_Start = a_Stream.ReadSingle();
|
||||
m_UV_Packed.m_Data = new byte[a_Stream.ReadInt32()];
|
||||
a_Stream.Read(m_UV_Packed.m_Data, 0, m_UV_Packed.m_Data.Length);
|
||||
a_Stream.AlignStream(4);
|
||||
m_UV_Packed.m_BitSize = a_Stream.ReadByte();
|
||||
a_Stream.Position += 3; //4 byte alignment
|
||||
|
||||
@ -788,7 +793,7 @@ namespace Unity_Studio
|
||||
{
|
||||
uint[] m_UV_Unpacked = UnpackBitVector(m_UV_Packed);
|
||||
int bitmax = 0;
|
||||
for (int b = 0; b < m_Vertices_Packed.m_BitSize; b++) { bitmax |= (1 << b); }
|
||||
for (int b = 0; b < m_UV_Packed.m_BitSize; b++) { bitmax |= (1 << b); }
|
||||
|
||||
m_UV1 = new float[m_VertexCount * 2];
|
||||
|
||||
@ -896,7 +901,7 @@ namespace Unity_Studio
|
||||
{
|
||||
uint[] m_FloatColors_Unpacked = UnpackBitVector(m_FloatColors);
|
||||
int bitmax = 0;
|
||||
for (int b = 0; b < m_Vertices_Packed.m_BitSize; b++) { bitmax |= (1 << b); }
|
||||
for (int b = 0; b < m_FloatColors.m_BitSize; b++) { bitmax |= (1 << b); }
|
||||
|
||||
m_Colors = new float[m_FloatColors.m_NumItems];
|
||||
|
||||
|
@ -23,9 +23,16 @@ namespace Unity_Studio
|
||||
|
||||
int defaultScreenOrientation = a_Stream.ReadInt32();
|
||||
int targetDevice = a_Stream.ReadInt32();
|
||||
int targetGlesGraphics = a_Stream.ReadInt32();
|
||||
if (sourceFile.version[0] == 5 || (sourceFile.version[0] == 4 && sourceFile.version[1] == 6 && sourceFile.version[2] >= 3))
|
||||
|
||||
if (sourceFile.version[0] < 5 || (sourceFile.version[0] == 5 && sourceFile.version[1] < 1))
|
||||
{ int targetGlesGraphics = a_Stream.ReadInt32(); }
|
||||
|
||||
if ((sourceFile.version[0] == 5 && sourceFile.version[1] < 1) || (sourceFile.version[0] == 4 && sourceFile.version[1] == 6 && sourceFile.version[2] >= 3))
|
||||
{ int targetIOSGraphics = a_Stream.ReadInt32(); }
|
||||
|
||||
if (sourceFile.version[0] == 5 && (sourceFile.version[1] > 2 || (sourceFile.version[1] == 2 && sourceFile.version[2] >= 1)))
|
||||
{ bool useOnDemandResources = a_Stream.ReadBoolean(); a_Stream.AlignStream(4); }
|
||||
|
||||
int targetResolution = a_Stream.ReadInt32();
|
||||
|
||||
if (sourceFile.version[0] == 3 && sourceFile.version[1] <= 1) { bool OverrideIPodMusic = a_Stream.ReadBoolean(); a_Stream.AlignStream(4); }
|
||||
|
@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Unity Studio")]
|
||||
[assembly: AssemblyDescription("- Compatible with all Unity versions from 2.5.0 to 4.6.9\r\n- Compatible with Web, PC, iOS, Android, PS3, Xbox 360, OSX and Linux games/apps\r\n- Automatically merges .split\r\n- 3D objets exported to FBX\r\n- Able to load audio streams from .resS files\r\n- Real-time preview window and export function for textures, audio clips, shaders and fonts\r\n - Textures: DDS (Alpha8bpp, ARGB16bpp, RGB24bpp, ARGB32bpp, BGRA32bpp, RGB565, DXT1, DXT5, RGBA16bpp)\r\n PVR (PVRTC_RGB2, PVRTC_RGBA2, PVRTC_RGBA4, PVRTC_RGB4, ETC_RGB4)\r\n - Audio clips: mp3, ogg, wav, xbox wav\r\n - Shader files are exported in plain-text\r\n - Fonts: ttf, otf")]
|
||||
[assembly: AssemblyDescription("- Compatible with all Unity versions from 2.5.0 to 5.2.2\r\n- Compatible with Web, PC, iOS, Android, PS3, Xbox 360, OSX and Linux games/apps\r\n- Automatically merges .split\r\n- 3D objets exported to FBX\r\n- Able to load audio streams from .resS files\r\n- Real-time preview window and export function for textures, audio clips, shaders and fonts\r\n - Textures: DDS (Alpha8bpp, ARGB16bpp, RGB24bpp, ARGB32bpp, BGRA32bpp, RGB565, DXT1, DXT5, RGBA16bpp)\r\n PVR (PVRTC_RGB2, PVRTC_RGBA2, PVRTC_RGBA4, PVRTC_RGB4, ETC_RGB4)\r\n - Audio clips: mp3, ogg, wav, xbox wav\r\n - Shader files are exported in plain-text\r\n - Fonts: ttf, otf")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Unity Studio")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014 Chipicao")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.4.6.9")]
|
||||
[assembly: AssemblyFileVersion("0.4.6.9")]
|
||||
[assembly: AssemblyVersion("0.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
|
@ -29,13 +29,22 @@ namespace Unity_Studio
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
m_CastShadows = a_Stream.ReadByte();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
if (sourceFile.version[0] < 5) { m_LightmapIndex = a_Stream.ReadByte(); }
|
||||
|
||||
if (sourceFile.version[0] < 5)
|
||||
{
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
m_CastShadows = a_Stream.ReadByte();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
m_LightmapIndex = a_Stream.ReadByte();
|
||||
}
|
||||
else
|
||||
{
|
||||
a_Stream.Position += 5; //suspicious alignment, could be 2 alignments between bools
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
a_Stream.AlignStream(4);
|
||||
m_CastShadows = a_Stream.ReadByte();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
a_Stream.AlignStream(4);
|
||||
|
||||
m_LightmapIndex = a_Stream.ReadUInt16();
|
||||
m_LightmapIndexDynamic = a_Stream.ReadUInt16();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ namespace Unity_Studio
|
||||
{
|
||||
public PPtr m_GameObject;
|
||||
public bool m_Enabled;
|
||||
public bool m_CastShadows;
|
||||
public byte m_CastShadows;
|
||||
public bool m_ReceiveShadows;
|
||||
public ushort m_LightmapIndex;
|
||||
public ushort m_LightmapIndexDynamic;
|
||||
@ -31,18 +31,27 @@ namespace Unity_Studio
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
m_CastShadows = a_Stream.ReadBoolean();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
if (sourceFile.version[0] < 5) { m_LightmapIndex = a_Stream.ReadByte(); }
|
||||
if (sourceFile.version[0] < 5)
|
||||
{
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
m_CastShadows = a_Stream.ReadByte();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
m_LightmapIndex = a_Stream.ReadByte();
|
||||
}
|
||||
else
|
||||
{
|
||||
a_Stream.Position += 5; //suspicious alignment, could be 2 alignments between bools
|
||||
m_Enabled = a_Stream.ReadBoolean();
|
||||
a_Stream.AlignStream(4);
|
||||
m_CastShadows = a_Stream.ReadByte();
|
||||
m_ReceiveShadows = a_Stream.ReadBoolean();
|
||||
a_Stream.AlignStream(4);
|
||||
|
||||
m_LightmapIndex = a_Stream.ReadUInt16();
|
||||
m_LightmapIndexDynamic = a_Stream.ReadUInt16();
|
||||
}
|
||||
|
||||
if (version[0] >= 3) { a_Stream.Position += 16; } //m_LightmapTilingOffset vector4d
|
||||
if (sourceFile.version[0] >= 5) { a_Stream.Position += 16; } //Vector4f m_LightmapTilingOffsetDynamic
|
||||
|
||||
m_Materials = new PPtr[a_Stream.ReadInt32()];
|
||||
for (int m = 0; m < m_Materials.Length; m++)
|
||||
|
@ -12,7 +12,7 @@ namespace Unity_Studio
|
||||
public int m_Height;
|
||||
public int m_CompleteImageSize;
|
||||
public int m_TextureFormat;
|
||||
public bool m_MipMap;
|
||||
public bool m_MipMap = false;
|
||||
public bool m_IsReadable;
|
||||
public bool m_ReadAllowed;
|
||||
public int m_ImageCount;
|
||||
@ -81,10 +81,19 @@ namespace Unity_Studio
|
||||
else if (m_TextureFormat < 35) { extension = ".pvr"; }
|
||||
else { extension = "_" + m_Width.ToString() + "x" + m_Height.ToString() + "." + m_TextureFormat.ToString() + ".tex"; }
|
||||
|
||||
m_MipMap = a_Stream.ReadBoolean();
|
||||
if (sourceFile.version[0] < 5 || (sourceFile.version[0] == 5 && sourceFile.version[1] < 2))
|
||||
{ m_MipMap = a_Stream.ReadBoolean(); }
|
||||
else
|
||||
{
|
||||
dwFlags += 0x20000;
|
||||
dwMipMapCount = a_Stream.ReadInt32();//is this with or without main image?
|
||||
dwCaps += 0x400008;
|
||||
}
|
||||
|
||||
m_IsReadable = a_Stream.ReadBoolean(); //2.6.0 and up
|
||||
m_ReadAllowed = a_Stream.ReadBoolean(); //3.0.0 and up
|
||||
a_Stream.Position += 1; //4 byte alignment
|
||||
a_Stream.AlignStream(4);
|
||||
|
||||
m_ImageCount = a_Stream.ReadInt32();
|
||||
m_TextureDimension = a_Stream.ReadInt32();
|
||||
//m_TextureSettings
|
||||
|
178
Unity Studio/UnityStudioForm.Designer.cs
generated
178
Unity Studio/UnityStudioForm.Designer.cs
generated
@ -37,6 +37,12 @@
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.extractBundleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extractFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.debugMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.buildClassStructuresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.dontLoadAssetsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.dontBuildHierarchyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exportClassStructuresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.uniqueNames = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.enablePreview = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -56,13 +62,16 @@
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.treeSearch = new System.Windows.Forms.TextBox();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.assetListView = new System.Windows.Forms.ListView();
|
||||
this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.listSearch = new System.Windows.Forms.TextBox();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.classesListView = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.progressbarPanel = new System.Windows.Forms.Panel();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.previewPanel = new System.Windows.Forms.Panel();
|
||||
@ -79,8 +88,11 @@
|
||||
this.FMODplayButton = new System.Windows.Forms.Button();
|
||||
this.fontPreviewBox = new System.Windows.Forms.RichTextBox();
|
||||
this.textPreviewBox = new System.Windows.Forms.TextBox();
|
||||
this.classPreviewPanel = new System.Windows.Forms.Panel();
|
||||
this.classTextBox = new System.Windows.Forms.TextBox();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.treeSearch = new System.Windows.Forms.TextBox();
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.openFolderDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
@ -94,13 +106,14 @@
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.progressbarPanel.SuspendLayout();
|
||||
this.previewPanel.SuspendLayout();
|
||||
this.FMODpanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FMODprogressBar)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FMODvolumeBar)).BeginInit();
|
||||
this.classPreviewPanel.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@ -108,6 +121,7 @@
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.debugMenuItem,
|
||||
this.optionsToolStripMenuItem,
|
||||
this.exportToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
@ -162,6 +176,53 @@
|
||||
this.extractFolderToolStripMenuItem.Text = "Extract folder...";
|
||||
this.extractFolderToolStripMenuItem.Click += new System.EventHandler(this.extractFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// debugMenuItem
|
||||
//
|
||||
this.debugMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.buildClassStructuresMenuItem,
|
||||
this.dontLoadAssetsMenuItem,
|
||||
this.dontBuildHierarchyMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.exportClassStructuresMenuItem});
|
||||
this.debugMenuItem.Name = "debugMenuItem";
|
||||
this.debugMenuItem.Size = new System.Drawing.Size(80, 20);
|
||||
this.debugMenuItem.Text = "Diagnostics";
|
||||
this.debugMenuItem.Visible = false;
|
||||
//
|
||||
// buildClassStructuresMenuItem
|
||||
//
|
||||
this.buildClassStructuresMenuItem.CheckOnClick = true;
|
||||
this.buildClassStructuresMenuItem.Name = "buildClassStructuresMenuItem";
|
||||
this.buildClassStructuresMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.buildClassStructuresMenuItem.Text = "Build class structures";
|
||||
//
|
||||
// dontLoadAssetsMenuItem
|
||||
//
|
||||
this.dontLoadAssetsMenuItem.CheckOnClick = true;
|
||||
this.dontLoadAssetsMenuItem.Name = "dontLoadAssetsMenuItem";
|
||||
this.dontLoadAssetsMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.dontLoadAssetsMenuItem.Text = "Don\'t load assets";
|
||||
this.dontLoadAssetsMenuItem.CheckedChanged += new System.EventHandler(this.dontLoadAssetsMenuItem_CheckedChanged);
|
||||
//
|
||||
// dontBuildHierarchyMenuItem
|
||||
//
|
||||
this.dontBuildHierarchyMenuItem.CheckOnClick = true;
|
||||
this.dontBuildHierarchyMenuItem.Name = "dontBuildHierarchyMenuItem";
|
||||
this.dontBuildHierarchyMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.dontBuildHierarchyMenuItem.Text = "Don\'t build hierarchy tree";
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(205, 6);
|
||||
//
|
||||
// exportClassStructuresMenuItem
|
||||
//
|
||||
this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem";
|
||||
this.exportClassStructuresMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.exportClassStructuresMenuItem.Text = "Export class structures";
|
||||
this.exportClassStructuresMenuItem.Click += new System.EventHandler(this.exportClassStructuresMenuItem_Click);
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
//
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -321,6 +382,7 @@
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.previewPanel);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.classPreviewPanel);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.statusStrip1);
|
||||
this.splitContainer1.Panel2MinSize = 400;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1264, 658);
|
||||
@ -334,6 +396,7 @@
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
//this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
@ -355,20 +418,6 @@
|
||||
this.tabPage1.Text = "Scene Hierarchy";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// treeSearch
|
||||
//
|
||||
this.treeSearch.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.treeSearch.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
this.treeSearch.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeSearch.Name = "treeSearch";
|
||||
this.treeSearch.Size = new System.Drawing.Size(410, 20);
|
||||
this.treeSearch.TabIndex = 0;
|
||||
this.treeSearch.Text = " Search ";
|
||||
this.treeSearch.Enter += new System.EventHandler(this.treeSearch_Enter);
|
||||
this.treeSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeSearch_KeyDown);
|
||||
this.treeSearch.Leave += new System.EventHandler(this.treeSearch_Leave);
|
||||
this.treeSearch.MouseEnter += new System.EventHandler(this.treeSearch_MouseEnter);
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.assetListView);
|
||||
@ -429,6 +478,43 @@
|
||||
this.listSearch.Enter += new System.EventHandler(this.listSearch_Enter);
|
||||
this.listSearch.Leave += new System.EventHandler(this.listSearch_Leave);
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.classesListView);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(410, 608);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "Asset Classes";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// classesListView
|
||||
//
|
||||
this.classesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.classesListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.classesListView.FullRowSelect = true;
|
||||
this.classesListView.Location = new System.Drawing.Point(0, 0);
|
||||
this.classesListView.MultiSelect = false;
|
||||
this.classesListView.Name = "classesListView";
|
||||
this.classesListView.Size = new System.Drawing.Size(410, 608);
|
||||
this.classesListView.TabIndex = 0;
|
||||
this.classesListView.UseCompatibleStateImageBehavior = false;
|
||||
this.classesListView.View = System.Windows.Forms.View.Details;
|
||||
this.classesListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.classesListView_ItemSelectionChanged);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.DisplayIndex = 1;
|
||||
this.columnHeader1.Text = "Name";
|
||||
this.columnHeader1.Width = 328;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.DisplayIndex = 0;
|
||||
this.columnHeader2.Text = "ID";
|
||||
//
|
||||
// progressbarPanel
|
||||
//
|
||||
this.progressbarPanel.Controls.Add(this.progressBar1);
|
||||
@ -613,6 +699,28 @@
|
||||
this.textPreviewBox.Visible = false;
|
||||
this.textPreviewBox.WordWrap = false;
|
||||
//
|
||||
// classPreviewPanel
|
||||
//
|
||||
this.classPreviewPanel.Controls.Add(this.classTextBox);
|
||||
this.classPreviewPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.classPreviewPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.classPreviewPanel.Name = "classPreviewPanel";
|
||||
this.classPreviewPanel.Size = new System.Drawing.Size(838, 634);
|
||||
this.classPreviewPanel.TabIndex = 3;
|
||||
this.classPreviewPanel.Visible = false;
|
||||
//
|
||||
// classTextBox
|
||||
//
|
||||
this.classTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.classTextBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.classTextBox.Multiline = true;
|
||||
this.classTextBox.Name = "classTextBox";
|
||||
this.classTextBox.ReadOnly = true;
|
||||
this.classTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.classTextBox.Size = new System.Drawing.Size(838, 634);
|
||||
this.classTextBox.TabIndex = 3;
|
||||
this.classTextBox.WordWrap = false;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -632,6 +740,20 @@
|
||||
this.toolStripStatusLabel1.Text = "Ready to go";
|
||||
this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// treeSearch
|
||||
//
|
||||
this.treeSearch.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.treeSearch.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
this.treeSearch.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeSearch.Name = "treeSearch";
|
||||
this.treeSearch.Size = new System.Drawing.Size(410, 20);
|
||||
this.treeSearch.TabIndex = 0;
|
||||
this.treeSearch.Text = " Search ";
|
||||
this.treeSearch.Enter += new System.EventHandler(this.treeSearch_Enter);
|
||||
this.treeSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeSearch_KeyDown);
|
||||
this.treeSearch.Leave += new System.EventHandler(this.treeSearch_Leave);
|
||||
this.treeSearch.MouseEnter += new System.EventHandler(this.treeSearch_MouseEnter);
|
||||
//
|
||||
// timer
|
||||
//
|
||||
this.timer.Interval = 10;
|
||||
@ -640,8 +762,8 @@
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.Filter = "Unity asset files|level*; mainData; CustomAssetBundle-*; CAB-*; BuildPlayer-*; *." +
|
||||
"assets; *.sharedAssets|Unity bundle files|*.unity3d; *.unity3d.lz4; *.assetbundle; *.bundle; *." +
|
||||
"bytes";
|
||||
"assets; *.sharedAssets|Unity bundle files|*.unity3d; *.unity3d.lz4; *.assetbundl" +
|
||||
"e; *.bundle; *.bytes";
|
||||
this.openFileDialog1.Multiselect = true;
|
||||
this.openFileDialog1.RestoreDirectory = true;
|
||||
//
|
||||
@ -672,6 +794,7 @@
|
||||
this.sceneTreeView.CheckBoxes = true;
|
||||
this.sceneTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.sceneTreeView.HideSelection = false;
|
||||
this.sceneTreeView.LineColor = System.Drawing.Color.Empty;
|
||||
this.sceneTreeView.Location = new System.Drawing.Point(0, 20);
|
||||
this.sceneTreeView.Name = "sceneTreeView";
|
||||
this.sceneTreeView.Size = new System.Drawing.Size(410, 588);
|
||||
@ -686,11 +809,13 @@
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.KeyPreview = true;
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MinimumSize = new System.Drawing.Size(620, 400);
|
||||
this.Name = "UnityStudioForm";
|
||||
this.Text = "Unity Studio";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UnityStudioForm_FormClosing);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.UnityStudioForm_KeyDown);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@ -699,10 +824,9 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage1.PerformLayout();
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage2.PerformLayout();
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.progressbarPanel.ResumeLayout(false);
|
||||
this.previewPanel.ResumeLayout(false);
|
||||
this.previewPanel.PerformLayout();
|
||||
@ -710,6 +834,8 @@
|
||||
this.FMODpanel.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FMODprogressBar)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FMODvolumeBar)).EndInit();
|
||||
this.classPreviewPanel.ResumeLayout(false);
|
||||
this.classPreviewPanel.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
@ -777,6 +903,18 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem showExpOpt;
|
||||
private GOHierarchy sceneTreeView;
|
||||
private System.Windows.Forms.ToolTip treeTip;
|
||||
private System.Windows.Forms.ToolStripMenuItem debugMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem buildClassStructuresMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem dontLoadAssetsMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem dontBuildHierarchyMenuItem;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.ListView classesListView;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.Panel classPreviewPanel;
|
||||
private System.Windows.Forms.TextBox classTextBox;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportClassStructuresMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,8 @@ namespace Unity_Studio
|
||||
private string productName = "";
|
||||
|
||||
Dictionary<string, Dictionary<string, string>> jsonMats;
|
||||
|
||||
Dictionary<string, SortedDictionary<int, ClassStrStruct>> AllClassStructures = new Dictionary<string, SortedDictionary<int, ClassStrStruct>>();
|
||||
|
||||
private FMOD.System system = null;
|
||||
private FMOD.Sound sound = null;
|
||||
private FMOD.Channel channel = null;
|
||||
@ -56,6 +57,10 @@ namespace Unity_Studio
|
||||
private int lastAFile = 0;
|
||||
private int lastGObject = 0;
|
||||
|
||||
//counters for progress bar
|
||||
private int totalAssetCount = 0;
|
||||
private int totalTreeNodes = 0;
|
||||
|
||||
[DllImport("gdi32.dll")]
|
||||
private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts);
|
||||
|
||||
@ -96,6 +101,8 @@ namespace Unity_Studio
|
||||
}
|
||||
}
|
||||
|
||||
progressBar1.Value = 0;
|
||||
|
||||
BuildAssetStrucutres();
|
||||
}
|
||||
}
|
||||
@ -162,6 +169,8 @@ namespace Unity_Studio
|
||||
LoadAssetsFile(fileName);
|
||||
}
|
||||
|
||||
progressBar1.Value = 0;
|
||||
|
||||
BuildAssetStrucutres();
|
||||
}
|
||||
else { StatusStripUpdate("Selected path deos not exist."); }
|
||||
@ -203,6 +212,8 @@ namespace Unity_Studio
|
||||
AssetsFile assetsFile = new AssetsFile(fileName, new EndianStream(File.OpenRead(fileName), EndianType.BigEndian));
|
||||
//if (Path.GetFileName(fileName) == "mainData") { mainDataFile = assetsFile; }
|
||||
|
||||
totalAssetCount += assetsFile.preloadTable.Count;
|
||||
|
||||
assetsfileList.Add(assetsFile);
|
||||
#region for 2.6.x find mainData and get string version
|
||||
if (assetsFile.fileGen == 6 && Path.GetFileName(fileName) != "mainData")
|
||||
@ -404,6 +415,69 @@ namespace Unity_Studio
|
||||
|
||||
|
||||
|
||||
private void UnityStudioForm_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
{
|
||||
debugMenuItem.Visible = !debugMenuItem.Visible;
|
||||
buildClassStructuresMenuItem.Checked = debugMenuItem.Visible;
|
||||
dontLoadAssetsMenuItem.Checked = debugMenuItem.Visible;
|
||||
dontBuildHierarchyMenuItem.Checked = debugMenuItem.Visible;
|
||||
if (tabControl1.TabPages.Contains(tabPage3)) { tabControl1.TabPages.Remove(tabPage3); }
|
||||
else { tabControl1.TabPages.Add(tabPage3); }
|
||||
}
|
||||
}
|
||||
|
||||
private void dontLoadAssetsMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (dontLoadAssetsMenuItem.Checked)
|
||||
{
|
||||
dontBuildHierarchyMenuItem.Checked = true;
|
||||
dontBuildHierarchyMenuItem.Enabled = false;
|
||||
}
|
||||
else { dontBuildHierarchyMenuItem.Enabled = true; }
|
||||
}
|
||||
|
||||
private void exportClassStructuresMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (AllClassStructures.Count > 0)
|
||||
{
|
||||
if (saveFolderDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
progressBar1.Value = 0;
|
||||
progressBar1.Maximum = AllClassStructures.Count;
|
||||
|
||||
var savePath = saveFolderDialog1.FileName;
|
||||
if (Path.GetFileName(savePath) == "Select folder or write folder name to create")
|
||||
{ savePath = Path.GetDirectoryName(saveFolderDialog1.FileName); }
|
||||
|
||||
foreach (var version in AllClassStructures)
|
||||
{
|
||||
if (version.Value.Count > 0)
|
||||
{
|
||||
string versionPath = savePath + "\\" + version.Key;
|
||||
Directory.CreateDirectory(versionPath);
|
||||
|
||||
foreach (var uclass in version.Value)
|
||||
{
|
||||
string saveFile = versionPath + "\\" + uclass.Key + " " + uclass.Value.Text + ".txt";
|
||||
using (StreamWriter TXTwriter = new StreamWriter(saveFile))
|
||||
{
|
||||
TXTwriter.Write(uclass.Value.members);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
progressBar1.PerformStep();
|
||||
}
|
||||
|
||||
StatusStripUpdate("Finished exporting class structures");
|
||||
progressBar1.Value = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void enablePreview_Check(object sender, EventArgs e)
|
||||
{
|
||||
if (lastLoadedAsset != null)
|
||||
@ -523,202 +597,246 @@ namespace Unity_Studio
|
||||
private void BuildAssetStrucutres()
|
||||
{
|
||||
#region first loop - read asset data & create list
|
||||
StatusStripUpdate("Building asset list...");
|
||||
assetListView.BeginUpdate();
|
||||
|
||||
string fileIDfmt = "D" + assetsfileList.Count.ToString().Length.ToString();
|
||||
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
if (!dontLoadAssetsMenuItem.Checked)
|
||||
{
|
||||
var a_Stream = assetsFile.a_Stream;
|
||||
var fileGen = assetsFile.fileGen;
|
||||
//var m_version = assetsFile.m_version;
|
||||
var version = assetsFile.version;
|
||||
string fileID = "1" + assetsfileList.IndexOf(assetsFile).ToString(fileIDfmt);
|
||||
StatusStripUpdate("Building asset list...");
|
||||
assetListView.BeginUpdate();
|
||||
progressBar1.Value = 0;
|
||||
progressBar1.Maximum = totalAssetCount;
|
||||
|
||||
//ListViewGroup assetGroup = new ListViewGroup(Path.GetFileName(assetsFile.filePath));
|
||||
string fileIDfmt = "D" + assetsfileList.Count.ToString().Length.ToString();
|
||||
|
||||
foreach (var asset in assetsFile.preloadTable.Values)
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
{
|
||||
asset.uniqueID = fileID + asset.uniqueID;
|
||||
a_Stream.Position = asset.Offset;
|
||||
var a_Stream = assetsFile.a_Stream;
|
||||
var fileGen = assetsFile.fileGen;
|
||||
//var m_version = assetsFile.m_version;
|
||||
var version = assetsFile.version;
|
||||
string fileID = "1" + assetsfileList.IndexOf(assetsFile).ToString(fileIDfmt);
|
||||
|
||||
switch (asset.Type2)
|
||||
//ListViewGroup assetGroup = new ListViewGroup(Path.GetFileName(assetsFile.filePath));
|
||||
|
||||
|
||||
foreach (var asset in assetsFile.preloadTable.Values)
|
||||
{
|
||||
case 1: //GameObject
|
||||
{
|
||||
GameObject m_GameObject = new GameObject(asset);
|
||||
|
||||
//asset.Text = m_GameObject.m_Name;
|
||||
asset.specificIndex = assetsFile.GameObjectList.Count;
|
||||
assetsFile.GameObjectList.Add(m_GameObject);
|
||||
break;
|
||||
}
|
||||
case 4: //Transform
|
||||
{
|
||||
Transform m_Transform = new Transform(asset);
|
||||
asset.uniqueID = fileID + asset.uniqueID;
|
||||
a_Stream.Position = asset.Offset;
|
||||
|
||||
asset.specificIndex = assetsFile.TransformList.Count;
|
||||
assetsFile.TransformList.Add(m_Transform);
|
||||
break;
|
||||
}
|
||||
case 224: //RectTransform
|
||||
{
|
||||
RectTransform m_Rect = new RectTransform(asset);
|
||||
|
||||
asset.specificIndex = assetsFile.TransformList.Count;
|
||||
assetsFile.TransformList.Add(m_Rect.m_Transform);
|
||||
break;
|
||||
}
|
||||
//case 21: //Material
|
||||
case 28: //Texture2D
|
||||
{
|
||||
Texture2D m_Texture2D = new Texture2D(asset, false);
|
||||
|
||||
asset.Text = m_Texture2D.m_Name;
|
||||
asset.exportSize = 128 + m_Texture2D.image_data_size;
|
||||
|
||||
#region Get Info Text
|
||||
asset.InfoText = "Width: " + m_Texture2D.m_Width.ToString() + "\nHeight: " + m_Texture2D.m_Height.ToString() + "\nFormat: ";
|
||||
|
||||
switch (m_Texture2D.m_TextureFormat)
|
||||
switch (asset.Type2)
|
||||
{
|
||||
case 1: //GameObject
|
||||
{
|
||||
case 1: asset.InfoText += "Alpha8"; break;
|
||||
case 2: asset.InfoText += "ARGB 4.4.4.4"; break;
|
||||
case 3: asset.InfoText += "BGR 8.8.8"; break;
|
||||
case 4: asset.InfoText += "GRAB 8.8.8.8"; break;
|
||||
case 5: asset.InfoText += "BGRA 8.8.8.8"; break;
|
||||
case 7: asset.InfoText += "RGB 5.6.5"; break;
|
||||
case 10: asset.InfoText += "RGB DXT1"; break;
|
||||
case 12: asset.InfoText += "ARGB DXT5"; break;
|
||||
case 13: asset.InfoText += "RGBA 4.4.4.4"; break;
|
||||
case 30: asset.InfoText += "PVRTC_RGB2"; asset.exportSize -= 76; break;
|
||||
case 31: asset.InfoText += "PVRTC_RGBA2"; asset.exportSize -= 76; break;
|
||||
case 32: asset.InfoText += "PVRTC_RGB4"; asset.exportSize = 52; break;
|
||||
case 33: asset.InfoText += "PVRTC_RGBA4"; asset.exportSize -= 76; break;
|
||||
case 34: asset.InfoText += "ETC_RGB4"; asset.exportSize -= 76; break;
|
||||
default: asset.InfoText += "unknown"; asset.exportSize -= 128; break;
|
||||
GameObject m_GameObject = new GameObject(asset);
|
||||
assetsFile.GameObjectList.Add(asset.m_PathID, m_GameObject);
|
||||
totalTreeNodes++;
|
||||
break;
|
||||
}
|
||||
case 4: //Transform
|
||||
{
|
||||
Transform m_Transform = new Transform(asset);
|
||||
assetsFile.TransformList.Add(asset.m_PathID, m_Transform);
|
||||
break;
|
||||
}
|
||||
case 224: //RectTransform
|
||||
{
|
||||
RectTransform m_Rect = new RectTransform(asset);
|
||||
assetsFile.TransformList.Add(asset.m_PathID, m_Rect.m_Transform);
|
||||
break;
|
||||
}
|
||||
//case 21: //Material
|
||||
case 28: //Texture2D
|
||||
{
|
||||
Texture2D m_Texture2D = new Texture2D(asset, false);
|
||||
|
||||
asset.Text = m_Texture2D.m_Name;
|
||||
asset.exportSize = 128 + m_Texture2D.image_data_size;
|
||||
|
||||
#region Get Info Text
|
||||
asset.InfoText = "Width: " + m_Texture2D.m_Width.ToString() + "\nHeight: " + m_Texture2D.m_Height.ToString() + "\nFormat: ";
|
||||
|
||||
switch (m_Texture2D.m_TextureFormat)
|
||||
{
|
||||
case 1: asset.InfoText += "Alpha8"; break;
|
||||
case 2: asset.InfoText += "ARGB 4.4.4.4"; break;
|
||||
case 3: asset.InfoText += "BGR 8.8.8"; break;
|
||||
case 4: asset.InfoText += "GRAB 8.8.8.8"; break;
|
||||
case 5: asset.InfoText += "BGRA 8.8.8.8"; break;
|
||||
case 7: asset.InfoText += "RGB 5.6.5"; break;
|
||||
case 10: asset.InfoText += "RGB DXT1"; break;
|
||||
case 12: asset.InfoText += "ARGB DXT5"; break;
|
||||
case 13: asset.InfoText += "RGBA 4.4.4.4"; break;
|
||||
case 30: asset.InfoText += "PVRTC_RGB2"; asset.exportSize -= 76; break;
|
||||
case 31: asset.InfoText += "PVRTC_RGBA2"; asset.exportSize -= 76; break;
|
||||
case 32: asset.InfoText += "PVRTC_RGB4"; asset.exportSize = 52; break;
|
||||
case 33: asset.InfoText += "PVRTC_RGBA4"; asset.exportSize -= 76; break;
|
||||
case 34: asset.InfoText += "ETC_RGB4"; asset.exportSize -= 76; break;
|
||||
default: asset.InfoText += "unknown"; asset.exportSize -= 128; break;
|
||||
}
|
||||
|
||||
switch (m_Texture2D.m_FilterMode)
|
||||
{
|
||||
case 0: asset.InfoText += "\nFilter Mode: Point "; break;
|
||||
case 1: asset.InfoText += "\nFilter Mode: Bilinear "; break;
|
||||
case 2: asset.InfoText += "\nFilter Mode: Trilinear "; break;
|
||||
|
||||
}
|
||||
|
||||
asset.InfoText += "\nAnisotropic level: " + m_Texture2D.m_Aniso.ToString() + "\nMip map bias: " + m_Texture2D.m_MipBias.ToString();
|
||||
|
||||
switch (m_Texture2D.m_WrapMode)
|
||||
{
|
||||
case 0: asset.InfoText += "\nWrap mode: Repeat"; break;
|
||||
case 1: asset.InfoText += "\nWrap mode: Clamp"; break;
|
||||
}
|
||||
#endregion
|
||||
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 49: //TextAsset
|
||||
{
|
||||
TextAsset m_TextAsset = new TextAsset(asset, false);
|
||||
|
||||
asset.Text = m_TextAsset.m_Name;
|
||||
asset.exportSize = m_TextAsset.exportSize;
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 83: //AudioClip
|
||||
{
|
||||
AudioClip m_AudioClip = new AudioClip(asset, false);
|
||||
|
||||
asset.Text = m_AudioClip.m_Name;
|
||||
asset.exportSize = (int)m_AudioClip.m_Size;
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 48: //Shader
|
||||
case 89: //CubeMap
|
||||
case 128: //Font
|
||||
{
|
||||
asset.Text = a_Stream.ReadAlignedString(a_Stream.ReadInt32());
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 129: //PlayerSettings
|
||||
{
|
||||
PlayerSettings plSet = new PlayerSettings(asset);
|
||||
productName = plSet.productName;
|
||||
base.Text = "Unity Studio - " + productName + " - " + assetsFile.m_Version;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (m_Texture2D.m_FilterMode)
|
||||
{
|
||||
case 0: asset.InfoText += "\nFilter Mode: Point "; break;
|
||||
case 1: asset.InfoText += "\nFilter Mode: Bilinear "; break;
|
||||
case 2: asset.InfoText += "\nFilter Mode: Trilinear "; break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
asset.InfoText += "\nAnisotropic level: " + m_Texture2D.m_Aniso.ToString() + "\nMip map bias: " + m_Texture2D.m_MipBias.ToString();
|
||||
|
||||
switch (m_Texture2D.m_WrapMode)
|
||||
{
|
||||
case 0: asset.InfoText += "\nWrap mode: Repeat"; break;
|
||||
case 1: asset.InfoText += "\nWrap mode: Clamp"; break;
|
||||
}
|
||||
#endregion
|
||||
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 49: //TextAsset
|
||||
{
|
||||
TextAsset m_TextAsset = new TextAsset(asset, false);
|
||||
|
||||
asset.Text = m_TextAsset.m_Name;
|
||||
asset.exportSize = m_TextAsset.exportSize;
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 83: //AudioClip
|
||||
{
|
||||
AudioClip m_AudioClip = new AudioClip(asset, false);
|
||||
|
||||
asset.Text = m_AudioClip.m_Name;
|
||||
asset.exportSize = (int)m_AudioClip.m_Size;
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 48: //Shader
|
||||
case 89: //CubeMap
|
||||
case 128: //Font
|
||||
{
|
||||
asset.Text = a_Stream.ReadAlignedString(a_Stream.ReadInt32());
|
||||
assetsFile.exportableAssets.Add(asset);
|
||||
break;
|
||||
}
|
||||
case 129: //PlayerSettings
|
||||
{
|
||||
PlayerSettings plSet = new PlayerSettings(asset);
|
||||
productName = plSet.productName;
|
||||
base.Text = "Unity Studio - " + productName + " - " + assetsFile.m_Version ;
|
||||
break;
|
||||
}
|
||||
if (asset.Text == "") { asset.Text = asset.TypeString + " #" + asset.uniqueID; }
|
||||
asset.SubItems.AddRange(new string[] { asset.TypeString, asset.exportSize.ToString() });
|
||||
|
||||
progressBar1.PerformStep();
|
||||
}
|
||||
|
||||
if (asset.Text == "") { asset.Text = asset.TypeString + " #" + asset.uniqueID; }
|
||||
asset.SubItems.AddRange(new string[] { asset.TypeString, asset.exportSize.ToString() });
|
||||
exportableAssets.AddRange(assetsFile.exportableAssets);
|
||||
//if (assetGroup.Items.Count > 0) { listView1.Groups.Add(assetGroup); }
|
||||
}
|
||||
|
||||
exportableAssets.AddRange(assetsFile.exportableAssets);
|
||||
//if (assetGroup.Items.Count > 0) { listView1.Groups.Add(assetGroup); }
|
||||
visibleAssets = exportableAssets;
|
||||
assetListView.VirtualListSize = visibleAssets.Count;
|
||||
|
||||
assetListView.AutoResizeColumn(1, ColumnHeaderAutoResizeStyle.ColumnContent);
|
||||
assetListView.AutoResizeColumn(2, ColumnHeaderAutoResizeStyle.ColumnContent);
|
||||
resizeNameColumn();
|
||||
|
||||
assetListView.EndUpdate();
|
||||
progressBar1.Value = 0;
|
||||
}
|
||||
|
||||
visibleAssets = exportableAssets;
|
||||
assetListView.VirtualListSize = visibleAssets.Count;
|
||||
|
||||
assetListView.AutoResizeColumn(1, ColumnHeaderAutoResizeStyle.ColumnContent);
|
||||
assetListView.AutoResizeColumn(2, ColumnHeaderAutoResizeStyle.ColumnContent);
|
||||
resizeNameColumn();
|
||||
|
||||
assetListView.EndUpdate();
|
||||
#endregion
|
||||
|
||||
#region second loop - build tree structure
|
||||
StatusStripUpdate("Building tree structure...");
|
||||
sceneTreeView.BeginUpdate();
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
if (!dontBuildHierarchyMenuItem.Checked)
|
||||
{
|
||||
GameObject fileNode = new GameObject(null);
|
||||
fileNode.Text = Path.GetFileName(assetsFile.filePath);
|
||||
StatusStripUpdate("Building tree structure...");
|
||||
sceneTreeView.BeginUpdate();
|
||||
progressBar1.Value = 0;
|
||||
progressBar1.Maximum = totalTreeNodes;
|
||||
|
||||
foreach (var m_GameObject in assetsFile.GameObjectList)
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
{
|
||||
var parentNode = fileNode;
|
||||
|
||||
Transform m_Transform;
|
||||
if (assetsfileList.TryGetTransform(m_GameObject.m_Transform, out m_Transform))
|
||||
GameObject fileNode = new GameObject(null);
|
||||
fileNode.Text = Path.GetFileName(assetsFile.filePath);
|
||||
|
||||
foreach (var m_GameObject in assetsFile.GameObjectList.Values)
|
||||
{
|
||||
Transform m_Father;
|
||||
if (assetsfileList.TryGetTransform(m_Transform.m_Father, out m_Father))
|
||||
var parentNode = fileNode;
|
||||
|
||||
Transform m_Transform;
|
||||
if (assetsfileList.TryGetTransform(m_GameObject.m_Transform, out m_Transform))
|
||||
{
|
||||
//GameObject Parent;
|
||||
if (assetsfileList.TryGetGameObject(m_Father.m_GameObject, out parentNode))
|
||||
Transform m_Father;
|
||||
if (assetsfileList.TryGetTransform(m_Transform.m_Father, out m_Father))
|
||||
{
|
||||
//parentNode = Parent;
|
||||
//GameObject Parent;
|
||||
if (assetsfileList.TryGetGameObject(m_Father.m_GameObject, out parentNode))
|
||||
{
|
||||
//parentNode = Parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parentNode.Nodes.Add(m_GameObject);
|
||||
progressBar1.PerformStep();
|
||||
}
|
||||
|
||||
parentNode.Nodes.Add(m_GameObject);
|
||||
|
||||
if (fileNode.Nodes.Count == 0) { fileNode.Text += " (no children)"; }
|
||||
sceneTreeView.Nodes.Add(fileNode);
|
||||
}
|
||||
sceneTreeView.EndUpdate();
|
||||
progressBar1.Value = 0;
|
||||
|
||||
if (File.Exists(mainPath + "\\materials.json"))
|
||||
{
|
||||
string matLine = "";
|
||||
using (StreamReader reader = File.OpenText(mainPath + "\\materials.json"))
|
||||
{ matLine = reader.ReadToEnd(); }
|
||||
|
||||
if (fileNode.Nodes.Count == 0) { fileNode.Text += " (no children)"; }
|
||||
sceneTreeView.Nodes.Add(fileNode);
|
||||
jsonMats = new JavaScriptSerializer().Deserialize<Dictionary<string, Dictionary<string, string>>>(matLine);
|
||||
//var jsonMats = new JavaScriptSerializer().DeserializeObject(matLine);
|
||||
}
|
||||
}
|
||||
sceneTreeView.EndUpdate();
|
||||
#endregion
|
||||
|
||||
if (File.Exists(mainPath + "\\materials.json"))
|
||||
#region build list of class strucutres
|
||||
if (buildClassStructuresMenuItem.Checked)
|
||||
{
|
||||
string matLine = "";
|
||||
using (StreamReader reader = File.OpenText(mainPath + "\\materials.json"))
|
||||
{ matLine = reader.ReadToEnd(); }
|
||||
//group class structures by versionv
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
{
|
||||
SortedDictionary<int, ClassStrStruct> curVer;
|
||||
if (AllClassStructures.TryGetValue(assetsFile.m_Version, out curVer))
|
||||
{
|
||||
foreach (var uClass in assetsFile.ClassStructures)
|
||||
{
|
||||
curVer[uClass.Key] = uClass.Value;
|
||||
}
|
||||
}
|
||||
else { AllClassStructures.Add(assetsFile.m_Version, assetsFile.ClassStructures); }
|
||||
}
|
||||
|
||||
jsonMats = new JavaScriptSerializer().Deserialize<Dictionary<string, Dictionary<string, string>>>(matLine);
|
||||
//var jsonMats = new JavaScriptSerializer().DeserializeObject(matLine);
|
||||
classesListView.BeginUpdate();
|
||||
foreach (var version in AllClassStructures)
|
||||
{
|
||||
ListViewGroup versionGroup = new ListViewGroup(version.Key);
|
||||
classesListView.Groups.Add(versionGroup);
|
||||
|
||||
foreach (var uclass in version.Value)
|
||||
{
|
||||
uclass.Value.Group = versionGroup;
|
||||
classesListView.Items.Add(uclass.Value);
|
||||
}
|
||||
}
|
||||
classesListView.EndUpdate();
|
||||
}
|
||||
#endregion
|
||||
|
||||
StatusStripUpdate("Finished loading " + assetsfileList.Count.ToString() + " files with " + (assetListView.Items.Count + sceneTreeView.Nodes.Count).ToString() + " exportable assets.");
|
||||
|
||||
@ -731,13 +849,23 @@ namespace Unity_Studio
|
||||
{
|
||||
e.Item = visibleAssets[e.ItemIndex];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void tabPageSelected(object sender, TabControlEventArgs e)
|
||||
{
|
||||
if (e.TabPageIndex == 0) { treeSearch.Select(); }
|
||||
else if (e.TabPageIndex == 1) { listSearch.Select(); }
|
||||
switch (e.TabPageIndex)
|
||||
{
|
||||
case 0: treeSearch.Select(); break;
|
||||
case 1:
|
||||
classPreviewPanel.Visible = false;
|
||||
previewPanel.Visible = true;
|
||||
listSearch.Select();
|
||||
break;
|
||||
case 2:
|
||||
previewPanel.Visible = false;
|
||||
classPreviewPanel.Visible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void recurseTreeCheck(TreeNodeCollection start)
|
||||
@ -780,7 +908,7 @@ namespace Unity_Studio
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
if (e.Modifiers == Keys.Control) //toggle all matching nodes //skip children?
|
||||
if (e.Control) //toggle all matching nodes //skip children?
|
||||
{
|
||||
sceneTreeView.BeginUpdate();
|
||||
//loop assetsFileList?
|
||||
@ -956,14 +1084,29 @@ namespace Unity_Studio
|
||||
}
|
||||
|
||||
|
||||
private void classesListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.IsSelected)
|
||||
{
|
||||
classTextBox.Text = ((ClassStrStruct)classesListView.SelectedItems[0]).members;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void splitContainer1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
resizeNameColumn();
|
||||
switch (tabControl1.TabIndex)
|
||||
{
|
||||
case 1: resizeNameColumn(); break;
|
||||
}
|
||||
}
|
||||
|
||||
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
|
||||
{
|
||||
resizeNameColumn();
|
||||
switch (tabControl1.TabIndex)
|
||||
{
|
||||
case 1: resizeNameColumn(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1645,7 +1788,7 @@ namespace Unity_Studio
|
||||
#region write Models, collect Mesh & Material objects
|
||||
foreach (var assetsFile in assetsfileList)
|
||||
{
|
||||
foreach (var m_GameObject in assetsFile.GameObjectList)
|
||||
foreach (var m_GameObject in assetsFile.GameObjectList.Values)
|
||||
{
|
||||
if (m_GameObject.Checked || allNodes)
|
||||
{
|
||||
@ -2819,7 +2962,10 @@ namespace Unity_Studio
|
||||
|
||||
assetListView.VirtualListSize = 0;
|
||||
assetListView.Items.Clear();
|
||||
assetListView.Groups.Clear();
|
||||
//assetListView.Groups.Clear();
|
||||
|
||||
classesListView.Items.Clear();
|
||||
classesListView.Groups.Clear();
|
||||
|
||||
previewPanel.BackgroundImage = global::Unity_Studio.Properties.Resources.preview;
|
||||
previewPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
@ -2830,7 +2976,7 @@ namespace Unity_Studio
|
||||
lastSelectedItem = null;
|
||||
lastLoadedAsset = null;
|
||||
|
||||
FMODinit();
|
||||
//FMODinit();
|
||||
|
||||
}
|
||||
|
||||
|
@ -299,9 +299,6 @@ Check this option to add a unique numeric identifier at the end of each filename
|
||||
B4miQIUoSo42AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>440, 17</value>
|
||||
</metadata>
|
||||
<data name="fontPreviewBox.Text" xml:space="preserve">
|
||||
<value>abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWYZ
|
||||
1234567890.:,;'\"(!?)+-*/=
|
||||
@ -320,6 +317,9 @@ The quick brown fox jumps over the lazy dog. 1234567890
|
||||
|
||||
The quick brown fox jumps over the lazy dog. 1234567890</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>440, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>556, 17</value>
|
||||
</metadata>
|
||||
|
@ -40,10 +40,7 @@ namespace Unity_Studio
|
||||
AssetsFile sourceFile = assetsfileList[m_elm.m_FileID];
|
||||
|
||||
//TryGetValue should be safe because m_PathID is 0 when initialized and PathID values range from 1
|
||||
if (sourceFile.preloadTable.TryGetValue(m_elm.m_PathID, out result))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (sourceFile.preloadTable.TryGetValue(m_elm.m_PathID, out result)) { return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -53,14 +50,11 @@ namespace Unity_Studio
|
||||
{
|
||||
m_Transform = null;
|
||||
|
||||
AssetPreloadData TransformPD;
|
||||
if (assetsfileList.TryGetPD(m_elm, out TransformPD))
|
||||
if (m_elm != null && m_elm.m_FileID >= 0 && m_elm.m_FileID < assetsfileList.Count)
|
||||
{
|
||||
if (TransformPD.specificIndex >= 0 && TransformPD.specificIndex < TransformPD.sourceFile.TransformList.Count)
|
||||
{
|
||||
m_Transform = TransformPD.sourceFile.TransformList[TransformPD.specificIndex];
|
||||
return true;
|
||||
}
|
||||
AssetsFile sourceFile = assetsfileList[m_elm.m_FileID];
|
||||
|
||||
if (sourceFile.TransformList.TryGetValue(m_elm.m_PathID, out m_Transform)) { return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -70,14 +64,11 @@ namespace Unity_Studio
|
||||
{
|
||||
m_GameObject = null;
|
||||
|
||||
AssetPreloadData GameObjectPD;
|
||||
if (assetsfileList.TryGetPD(m_elm, out GameObjectPD))
|
||||
if (m_elm != null && m_elm.m_FileID >= 0 && m_elm.m_FileID < assetsfileList.Count)
|
||||
{
|
||||
if (GameObjectPD.specificIndex >= 0 && GameObjectPD.specificIndex < GameObjectPD.sourceFile.GameObjectList.Count)
|
||||
{
|
||||
m_GameObject = GameObjectPD.sourceFile.GameObjectList[GameObjectPD.specificIndex];
|
||||
return true;
|
||||
}
|
||||
AssetsFile sourceFile = assetsfileList[m_elm.m_FileID];
|
||||
|
||||
if (sourceFile.GameObjectList.TryGetValue(m_elm.m_PathID, out m_GameObject)) { return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user