public void Read(BinaryBuffer buf, PrefabFooter footer) { var typeLocalID = buf.ReadInt(); var typeGUID = footer.LocalToGuid(typeLocalID); var type = DeltaCore.Get <Type>(typeGUID); bindings = NodeBindings.GetBindings(type); var numFields = footer.collectionCounts.Pop(); if (numFields > 0) { fields = new FieldOverride[bindings.fields.Length]; } for (var iField = 0; iField < numFields; iField++) { var overrideIndex = buf.ReadInt(); var fieldSize = footer.fieldSizes.Dequeue(); //Index if the type matches if (footer.DoesFieldTypeMatch(typeLocalID, iField)) { fields[overrideIndex] = new FieldOverride { buf = buf, position = buf.position, length = fieldSize }; } buf.position += fieldSize; } var numChildren = footer.collectionCounts.Pop(); if (numChildren > 0) { children = new PrefabNode[numChildren]; } for (var iChild = 0; iChild < numChildren; iChild++) { var child = new PrefabNode(); children[iChild] = child; child.Read(buf, footer); } }