(UnityFS): adjusted texture reader.

This commit is contained in:
morkt
2018-12-29 22:30:35 +04:00
parent 6c23aa0bed
commit 1aec603bba
2 changed files with 4 additions and 1 deletions

View File

@@ -323,6 +323,8 @@ namespace GameRes.Formats.Unity
return ReadTextAsset (file, obj); return ReadTextAsset (file, obj);
else if ("Texture2D" == type) else if ("Texture2D" == type)
type = "image"; type = "image";
else if ("AssetBundle" == type)
return null;
return new AssetEntry { return new AssetEntry {
Type = type, Type = type,

View File

@@ -214,7 +214,8 @@ namespace GameRes.Formats.Unity
ImageData Unpack () ImageData Unpack ()
{ {
m_texture.LoadData (m_reader); if (null == m_texture.m_Data || 0 == m_texture.m_Data.Length)
m_texture.LoadData (m_reader);
byte[] pixels; byte[] pixels;
switch (m_texture.m_TextureFormat) switch (m_texture.m_TextureFormat)
{ {