You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for NLua, it's a wonderful project that has provided enormously useful for us.
We are using sandboxed NLua that executes user generated scripts on server side. I have setup a Lua debug hook to kill scripts that are running too long, and this works fine. I'd now like to optimize specific Lua function calls that users's scripts may contain, but I'm unsure how to set it up.
Example case
Lua function that needs to be optimized: GetParamValue(paramName) -> returns either string, integer, or float value.
I need to check whether a specific Lua function (GetParamValue) is invoked by utilizing a debug hook event handler. If the specific Lua function is called, it's crucial to examine the argument (paramName). In certain scenarios, which are not detailed here, executing Lua code within the C# event handler is necessary before allowing the execution of the user's Lua script to proceed to completion.
Is this possible to do in NLua? If yes, could someone more experienced provide some pointers?
Hello,
First of all, thank you for NLua, it's a wonderful project that has provided enormously useful for us.
We are using sandboxed NLua that executes user generated scripts on server side. I have setup a Lua debug hook to kill scripts that are running too long, and this works fine. I'd now like to optimize specific Lua function calls that users's scripts may contain, but I'm unsure how to set it up.
Example case
Lua function that needs to be optimized: GetParamValue(paramName) -> returns either string, integer, or float value.
I need to check whether a specific Lua function (GetParamValue) is invoked by utilizing a debug hook event handler. If the specific Lua function is called, it's crucial to examine the argument (paramName). In certain scenarios, which are not detailed here, executing Lua code within the C# event handler is necessary before allowing the execution of the user's Lua script to proceed to completion.
Is this possible to do in NLua? If yes, could someone more experienced provide some pointers?
NLua Initialization and event Subscription
Event handler
The text was updated successfully, but these errors were encountered: