diff --git a/ArcFormats/Unity/Gx4Lib/ArcDAT.cs b/ArcFormats/Unity/Gx4Lib/ArcDAT.cs index 6ef037c5..2311cad2 100644 --- a/ArcFormats/Unity/Gx4Lib/ArcDAT.cs +++ b/ArcFormats/Unity/Gx4Lib/ArcDAT.cs @@ -135,7 +135,7 @@ namespace GameRes.Formats.Unity.Gx4Lib long base_pos = asset_pos + header_size - 4; input.Position = base_pos; - var index = new ResourcesAssetsDeserializer (arc.File); + var index = new ResourcesAssetsDeserializer (arc.File.Name); var dir = index.Parse (input, base_pos); if (null == dir || 0 == dir.Count) return base.OpenEntry (arc, entry);; diff --git a/ArcFormats/Unity/ResourcesAssets.cs b/ArcFormats/Unity/ResourcesAssets.cs index 978c0c6b..ecbc3250 100644 --- a/ArcFormats/Unity/ResourcesAssets.cs +++ b/ArcFormats/Unity/ResourcesAssets.cs @@ -33,9 +33,9 @@ namespace GameRes.Formats.Unity string m_res_name; Dictionary m_bundles; - public ResourcesAssetsDeserializer (ArcView file) + public ResourcesAssetsDeserializer (string arc_name) { - m_res_name = file.Name; + m_res_name = arc_name; } public List Parse (AssetReader input, long base_offset = 0) @@ -50,8 +50,11 @@ namespace GameRes.Formats.Unity { input.Position = obj.Offset + base_offset; AssetEntry entry = null; - switch (obj.TypeId) + int id = obj.TypeId > 0 ? obj.TypeId : obj.ClassId; + switch (id) { + case 48: // Shader + case 114: // MonoBehaviour default: break; @@ -126,7 +129,6 @@ namespace GameRes.Formats.Unity entry.Type = "image"; break; } - case 114: // MonoBehaviour case 128: // Font { entry = new AssetEntry {