ObjectLayoutInspector
ObjectLayoutInspector copied to clipboard
Recursive TypeLayout
TypeLayout for Components
should be able to return 4
fields, not 2
.
public struct Components
{
public DoubleFloatComponent a;
public EnumIntComponent b;
}
public struct DoubleFloatComponent
{
public double a;
public float b;
}
public struct EnumIntComponent
{
public MyByteEnum a;
public int b;
}
public enum MyByteEnum : byte
{
A,
B
}
var layout = ObjectLayoutInspector.TypeLayout.GetLayout<Components>(recursively = true);
Similar to PrintLayout(recursively = true
.