Skip to content

Commit 1bdab83

Browse files
committed
Updated UE4.23 support: UTexture2D serialization
1 parent 6fc2aae commit 1bdab83

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Unreal/UnTexture4.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,22 @@ struct FTexturePlatformData
9898
Ar << D.PixelFormat;
9999

100100
after_pixel_format:
101-
int FirstMip;
101+
int32 FirstMip;
102102
Ar << FirstMip; // only for cooked, but we don't read FTexturePlatformData for non-cooked textures
103103
DBG(" SizeX=%d SizeY=%d NumSlices=%d PixelFormat=%s FirstMip=%d\n", D.SizeX, D.SizeY, D.NumSlices, *D.PixelFormat, FirstMip);
104104
D.Mips.Serialize2<FTexture2DMipMap::Serialize4>(Ar);
105+
106+
if (Ar.Game >= GAME_UE4(23))
107+
{
108+
bool bIsVirtual;
109+
Ar << bIsVirtual;
110+
if (bIsVirtual)
111+
{
112+
// Requires extra serializing
113+
appError("VirtualTextures are not supported");
114+
}
115+
}
116+
105117
return Ar;
106118
unguard;
107119
}
@@ -161,6 +173,7 @@ void UTexture2D::Serialize4(FArchive& Ar)
161173
Ar << PixelFormatEnum;
162174
while (stricmp(PixelFormatEnum, "None") != 0)
163175
{
176+
DBG(" PixelFormat: %s\n", *PixelFormatEnum);
164177
int32 SkipOffset;
165178
Ar << SkipOffset;
166179
if (Ar.Game >= GAME_UE4(20))

umodel

0 Bytes
Binary file not shown.

umodel.exe

512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)