ScriptOptions class contains options to customize the behavior of individual Script objects.
Properties
Gets or sets the script loader used for loading scripts and modules.
Gets or sets the debug print handler (used by Lua’s
print function).Gets or sets the debug input handler (takes a prompt and returns input, used for interactive interpreters like debug.debug).
Gets or sets whether error messages use Lua error locations instead of SolarSharp improved ones. Use this for compatibility with legacy Lua code that parses error messages.
Gets or sets the behavior of the colon (’:’) operator in callbacks to CLR code.
Gets or sets the stream used as stdin. If null, a default stream is used.
Gets or sets the stream used as stdout. If null, a default stream is used.
Gets or sets the stream used as stderr. If null, a default stream is used.
Gets or sets the stack depth threshold at which SolarSharp starts doing tail call optimizations (TCO).TCOs can prevent stack overflows in corner cases but lose debug information. SolarSharp starts performing TCOs only after reaching this threshold.
- Default: 65536 (64K entries)
- Set to
int.MaxValueto disable TCOs entirely - Set to
0to always enable TCOs
Gets or sets whether the thread check is enabled.A “lazy” thread check is performed every time execution is entered to ensure no two threads call SolarSharp execution concurrently. The check is best-effort and might trigger in odd legal situations (like switching threads inside a CLR callback without actual concurrency).Disable this if the thread check is causing problems, but ensure you’re not calling SolarSharp execution concurrently as it’s not supported.