(Unity): adjusted texture entries deserialization.

This commit is contained in:
morkt
2018-04-20 21:20:50 +04:00
parent 7bbaa26051
commit 1392dc61d3
4 changed files with 40 additions and 34 deletions

View File

@@ -130,7 +130,9 @@ namespace GameRes.Formats.Unity
input = new StreamRegion (input, obj.Offset, obj.Size);
var reader = new AssetReader (input, entry.Name);
reader.SetupReaders (obj.Asset);
return new Texture2DDecoder (reader);
var tex = new Texture2D();
tex.Load (reader);
return new Texture2DDecoder (tex, reader);
}
internal static byte[] UnpackLzma (byte[] input, int unpacked_size)