From b04134c71bb2f36dcb5122a293988caee8ce4260 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 31 Aug 2018 19:12:18 +0400 Subject: [PATCH] (Texture2D): old formats work-around. --- ArcFormats/Unity/Texture2D.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ArcFormats/Unity/Texture2D.cs b/ArcFormats/Unity/Texture2D.cs index 43e8ea49..f938fa19 100644 --- a/ArcFormats/Unity/Texture2D.cs +++ b/ArcFormats/Unity/Texture2D.cs @@ -79,9 +79,12 @@ namespace GameRes.Formats.Unity m_CompleteImageSize = reader.ReadInt32(); m_TextureFormat = (TextureFormat)reader.ReadInt32(); m_MipCount = reader.ReadInt32(); - m_IsReadable = reader.ReadBool(); - m_ReadAllowed = reader.ReadBool(); - reader.Align(); + if (reader.Format > 9) + { + m_IsReadable = reader.ReadBool(); + m_ReadAllowed = reader.ReadBool(); + reader.Align(); + } m_ImageCount = reader.ReadInt32(); m_TextureDimension = reader.ReadInt32(); m_FilterMode = reader.ReadInt32();