If I have this:
[Serialiazable]
public struct Vector6
{
public float I { get; set; }
public float J { get; set; }
public float K { get; set; }
public float X { get; set; }
public float Y { get; set; }
public float Z { get; set; }
public Vector6(float v1, float v2, float v3, float v4, float v5, float v6)
{
I = v1;
J = v2;
K = v3;
X = v4;
Y = v5;
Z = v6;
}
}
I cannot see the properties for this (just an expand icon “fromto” that does not show anything):
[EditorOrder(0), EditorDisplay("edit", "fromto"), DefaultValue(typeof(Vector6), "0f, 0f, 0f, 0f, 0f, 0f")]
public Vector6 Pfromto
{
get => attrFromto;
set {
attrFromto = value;
}
}
although I can do this:
Vector6 test = new (1,2,3,4,5,6);
I can see a really bloated work around of having a fake separate property for each bit of the struct, but is there a cleaner way of just exposing the struct, whilst still keeping its constructor available to the rest of my code?