Is there anyway to get a list of all the names of used globals?
One way is to not load any globals, and then execute the script. let it crash and parse the exception for the name.. very ugly...
Is there anyway to get a list of all the names of used globals?
One way is to not load any globals, and then execute the script. let it crash and parse the exception for the name.. very ugly...
Yes the
Lua
class has a property calledGlobals
witch isIEnumerable<string>
so you can do something like this:What this method does is it executes a sript and returns all the globas in the file.