From 8149b9092ba1d40f06bd3e0ae998ff6f8983b3dd Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Tue, 10 Dec 2019 20:34:38 -0500 Subject: [PATCH] Fix replacing cubemaps in nutexb --- File_Format_Library/FileFormats/Texture/NUTEXB.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/File_Format_Library/FileFormats/Texture/NUTEXB.cs b/File_Format_Library/FileFormats/Texture/NUTEXB.cs index c3f959b4..35fe3d3e 100644 --- a/File_Format_Library/FileFormats/Texture/NUTEXB.cs +++ b/File_Format_Library/FileFormats/Texture/NUTEXB.cs @@ -337,7 +337,13 @@ namespace FirstPlugin if (Width != tex.Texture.Width || Height != tex.Texture.Height) throw new Exception("Image size must be the same!"); - ImageData = tex.Texture.TextureData[0][0]; + List data = new List(); + foreach (var array in tex.Texture.TextureData) + data.Add(array[0]); + + ImageData = Utils.CombineByteArray(data.ToArray()); + + data.Clear(); Width = tex.Texture.Width; Height = tex.Texture.Height;