CallbackArguments class is a container for arguments passed to a C# callback function from Lua. It provides convenient methods for accessing and validating arguments.
Properties
Gets the count of arguments.
Gets whether this is a method call (i.e., called with colon ’:’ operator in Lua).When true, the first argument is the ‘self’ object.
Indexer
Gets the LuaValue at the specified index, or Void if not found.Indices are 0-based (unlike Lua’s 1-based indexing).
Access Methods
Gets the LuaValue at the specified index, or null if out of bounds.
The value, or null if out of bounds
Returns a copy of CallbackArguments where the first “self” argument is skipped if this was a method call.
Arguments with ‘self’ removed (if method call), otherwise returns itself
Type Validation Methods
Gets the specified argument as a specific type, throwing an exception if conversion fails.
The validated value
Gets the specified argument as an integer, throwing if not a valid integer.
The integer value
Gets the specified argument as a string, calling the __tostring metamethod if needed.
The string representation