This repository was archived by the owner on May 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 252
Ignore formats removes next node #120
Copy link
Copy link
Open
Description
Imagine this code:
public class BufferView
{
[ZeroFormatter.IgnoreFormat] public int Width { get => TriangleCount; set => TriangleCount = value; }
[ZeroFormatter.IgnoreFormat] public int Height { get => VertexCount; set => VertexCount = value; }
[ZeroFormatter.Index(0)] public virtual byte Padding { get; set; } // IgnoreFormat for some reason removes the first index
[ZeroFormatter.Index(1)] public virtual long Start { get; set; }
[ZeroFormatter.Index(2)] public virtual long ByteLength { get; set; }
[ZeroFormatter.Index(3)] public virtual int TriangleCount { get; set; }
[ZeroFormatter.Index(4)] public virtual int VertexCount { get; set; }
}This will result in Padding not being serialized - when searching for this property in the ZFC-generated file, it's no there. If the properties with IgnoreFormatAttribute are moved to the end, even the whole next ZeroFormattable class is removed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels