NLua icon indicating copy to clipboard operation
NLua copied to clipboard

Get all variables and functions

Open Pastor111 opened this issue 3 years ago • 2 comments

Is there a way of getting all the variables and functions that a lua script contain?

Pastor111 avatar Jul 05 '21 13:07 Pastor111

You could get a table of all the globals in the lua state with lua.GetTable("_G");

The lua object also has a member lua.Globals but I couldn't get that to work for some reason.

CJ5518 avatar Jul 06 '21 18:07 CJ5518

Thank you it worked

Pastor111 avatar Jul 07 '21 07:07 Pastor111