mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed #165
This commit is contained in:
parent
e5104d5cc7
commit
140a732046
@ -469,8 +469,10 @@ 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
|
||||||
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) && m_MeshCompression == 0))//2017.3
|
((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
|
||||||
{
|
{
|
||||||
var m_IndexFormat = reader.ReadInt32();
|
var m_IndexFormat = reader.ReadInt32();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ namespace UnityStudio
|
|||||||
private bool baseDefinitions;
|
private bool baseDefinitions;
|
||||||
private List<int[]> classIDs = new List<int[]>();//use for 5.5.0
|
private List<int[]> classIDs = new List<int[]>();//use for 5.5.0
|
||||||
|
|
||||||
public static string[] buildTypeSplit = { ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
|
||||||
|
|
||||||
#region cmmon string
|
#region cmmon string
|
||||||
private static Dictionary<int, string> baseStrings = new Dictionary<int, string>
|
private static Dictionary<int, string> baseStrings = new Dictionary<int, string>
|
||||||
@ -324,9 +323,8 @@ namespace UnityStudio
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
buildType = m_Version.Split(buildTypeSplit, StringSplitOptions.RemoveEmptyEntries);
|
buildType = Regex.Replace(m_Version, @"\d", "").Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
var strver = from Match m in Regex.Matches(m_Version, @"[0-9]") select m.Value;
|
version = Regex.Matches(m_Version, @"\d").Cast<Match>().Select(m => int.Parse(m.Value)).ToArray();
|
||||||
version = Array.ConvertAll(strver.ToArray(), int.Parse);
|
|
||||||
if (version[0] == 2 && version[1] == 0 && version[2] == 1 && version[3] == 7)//2017.x
|
if (version[0] == 2 && version[1] == 0 && version[2] == 1 && version[3] == 7)//2017.x
|
||||||
{
|
{
|
||||||
var nversion = new int[version.Length - 3];
|
var nversion = new int[version.Length - 3];
|
||||||
|
@ -116,8 +116,8 @@ namespace UnityStudio
|
|||||||
{
|
{
|
||||||
//make use of the bundle file version
|
//make use of the bundle file version
|
||||||
assetsFile.m_Version = bundleFile.versionEngine;
|
assetsFile.m_Version = bundleFile.versionEngine;
|
||||||
assetsFile.version = Array.ConvertAll((from Match m in Regex.Matches(assetsFile.m_Version, @"[0-9]") select m.Value).ToArray(), int.Parse);
|
assetsFile.version = Regex.Matches(bundleFile.versionEngine, @"\d").Cast<Match>().Select(m => int.Parse(m.Value)).ToArray();
|
||||||
assetsFile.buildType = bundleFile.versionEngine.Split(AssetsFile.buildTypeSplit, StringSplitOptions.RemoveEmptyEntries);
|
assetsFile.buildType = Regex.Replace(bundleFile.versionEngine, @"\d", "").Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
assetsfileList.Add(assetsFile);
|
assetsfileList.Add(assetsFile);
|
||||||
|
@ -1435,7 +1435,7 @@ namespace UnityStudio
|
|||||||
break;
|
break;
|
||||||
case "exportSelectedAssetsMenuItem":
|
case "exportSelectedAssetsMenuItem":
|
||||||
toExportAssets = new List<AssetPreloadData>(assetListView.SelectedIndices.Count);
|
toExportAssets = new List<AssetPreloadData>(assetListView.SelectedIndices.Count);
|
||||||
foreach (var i in assetListView.SelectedIndices.OfType<int>())
|
foreach (int i in assetListView.SelectedIndices)
|
||||||
{
|
{
|
||||||
toExportAssets.Add((AssetPreloadData)assetListView.Items[i]);
|
toExportAssets.Add((AssetPreloadData)assetListView.Items[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user