Is there any workaround for the error CS1663 ("Fixed size buffer type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float or double.")?
I need to declare a unsafe fixed array from another blittable custom type struct but I'm stuck in this compiler error.
Showing some code to elucidate the problem below.
struct s1
{
byte _b1;
byte _b2;
}
unsafe struct s2
{
fixed s1 _s1[5]; // CS1663 here...
}
Note that the two structs are blittable, so the error doesn't make any sense for me.
Anyone have any idea about what I could do?
Thanks.
struct s2 { fixed s1 s1[5]; }
? – Vadim Martynov