The rather new-ish System.Half is not a primitive so you can't make a compile time const of it to use as an optional arg. Currently there's discussion of making it a primitive in a later C# release, but it hasn't happened yet. Is there some work around to do something like this?:
// This gets the compile error: The type 'Half' can't be declared const
const Half MyVal = 42;
void MyMethod(Half myArg = MyVal)
{
...
}
You can try using
readonlyinstead ofconst, something like this:Fiddle