moonsharp
moonsharp copied to clipboard
"debug" module is not available on the Unity
Hello for everyone!
I'm trying to use debug.setmetatable
from my Lua script (Unity environment).
C#:
string luaScript = ...;
Script.RunString(luaScript);
Lua script:
print(debug.setmetatable)
Unfortunately, I get the following error when running this script:
attempt to index a nil value
Next, I'm trying to check the availability of debug
module:
Script.RunString("return debug")
This script returns the Nil
value for me.
I'm check out this doc Standard Library Progress, and it says that debug
and debug.setmetatable
are supported constructions.
Please tell me what I'm doing wrong?
(Moonsharp 2.0.0.0 Unity 2018.2.14f1)
The debug module is disabled by default. This is documented here.