namespace EvilEngine.Adapters.Unreal.Unreal3; public sealed record Ue3Layout(string Name, int FileVersion, int Licensee, bool WideOffsets, bool ChunkListInHeader) { public static readonly Ue3Layout Udk = new("UDK", 868, 0, false, false); public static readonly Ue3Layout Psyonix = new("Psyonix's", 868, 28, true, true); public static IReadOnlyList Known { get; } = [Udk, Psyonix]; public int ChunkSize => WideOffsets ? 24 : 16; public static Ue3Layout? For(int fileVersion, int licensee) { return Known.FirstOrDefault(layout => layout.FileVersion == fileVersion && layout.Licensee == licensee); } }