It would be nice to have a fast-lane access to the typed values as opposed to having only TryRead. Unfortunately those are all marked internal.
More often than not I know I'll be reading a number so I'd really like to use TryReadNumber etc instead (copied from LuaValue) since that's much more streamlined and faster at scale:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal bool TryReadNumber(out double result)
{
if (Type == LuaValueType.Number)
{
result = value;
return true;
}
result = default!;
return false;
}
It would be nice to have a fast-lane access to the typed values as opposed to having only
TryRead. Unfortunately those are all markedinternal.More often than not I know I'll be reading a number so I'd really like to use
TryReadNumberetc instead (copied from LuaValue) since that's much more streamlined and faster at scale: