Actual code appears to be like this:
`
Mesh.ArrayFormat format = Mesh.ArrayFormat.FormatVertex |
Mesh.ArrayFormat.FormatNormal |
Mesh.ArrayFormat.FormatIndex |
Mesh.ArrayFormat.FormatTexUV |
Mesh.ArrayFormat.FormatTexUV2 |
Mesh.ArrayFormat.FormatCustom0;
format |= (Mesh.ArrayFormat)((int)Mesh.ArrayCustomFormat.RgbaFloat << (int)Mesh.ArrayFormat.FormatCustom0Shift);
`
Everything needs to be typecast as int or the compiler balks at doing a bit shift with an enumeration.
The ArrayFormat.FormatCustom0 flag just tells it you are using a custom0 array, so just treat it normally.
You want to bit shift the ArrayCustomFormat (whichever format you want to use) - and only shift that value, not the entire format.
Thanks again xyz! Your untested code was more than enough to point me in the right direction. Just want to make sure the right answer is here.
Still not sure why I was getting issues with using a PackedByteArray but there is no issue using the format I actually wanted to use. So that will have to be someone else's problem for another day.