Beispiel #1
0
        public override void Read(AssetBinaryReader reader, int nextStarting)
        {
            base.Read(reader, nextStarting);

            // Find an ObjectProperty named RowStruct
            FName decidedStructType = new FName("Generic");

            foreach (PropertyData thisData in Data)
            {
                if (thisData.Name.Value.Value == "RowStruct" && thisData is ObjectPropertyData thisObjData && thisObjData.Value.IsImport())
                {
                    decidedStructType = thisObjData.ToImport(reader.Asset).ObjectName;
                    break;
                }
            }

            reader.ReadInt32();

            Table = new UDataTable();

            int numEntries = reader.ReadInt32();

            for (int i = 0; i < numEntries; i++)
            {
                FName rowName    = reader.ReadFName();
                var   nextStruct = new StructPropertyData(rowName)
                {
                    StructType = decidedStructType
                };
                nextStruct.Read(reader, false, 1);
                Table.Data.Add(nextStruct);
            }
        }
Beispiel #2
0
 public DataTableExport(UDataTable data, UAsset asset, byte[] extras) : base(asset, extras)
 {
     Table = data;
 }