uLua v2.2.0
A Lua Modding Framework for Unity.
|
Class structure exposed to Lua. You should use this class as a base for your API data structures. More...
Public Member Functions | |
ExposedClass (string Name, LuaMonoBehaviour Context=null, bool ExposeOnInit=true, bool EnableObjectScript=false) | |
Public constructor. Exposes this object to Lua. More... | |
Public Member Functions inherited from uLua.LuaClass | |
LuaClass (string Name, LuaMonoBehaviour Context=null) | |
Public constructor. More... | |
void | Expose () |
Used to raise a flag when an object is exposed to Lua. More... | |
void | InvokeLua (string FunctionName, params object[] args) |
Invokes a Lua callback function. More... | |
void | Register (string FunctionName, string Code="", string args="") |
Registers a Lua callback function. This method is available in Lua. More... | |
Additional Inherited Members | |
Properties inherited from uLua.LuaClass | |
DynValue | this[DynValue Key] [get, set] |
Returns a Lua value indexed by the DynValue Key. More... | |
DynValue | this[string Key] [get, set] |
Returns a Lua value indexed by the string key. More... | |
LuaMonoBehaviour | Context [get, set] |
Used to access/set the context of an object. More... | |
string | Handle [get] |
Used to access the unique Handle of a Lua object. More... | |
bool | IsExposed [get] |
Used to track if an object has been exposed to Lua. More... | |
string | Name [get, protected set] |
Used to access the name of an object. More... | |
Properties inherited from uLua.ILuaObject | |
DynValue | this[DynValue Key] [get, set] |
Returns a Lua value indexed by the DynValue Key. More... | |
DynValue | this[string Key] [get, set] |
Returns a Lua value indexed by the string key. More... | |
LuaMonoBehaviour | Context [get, set] |
Used to access/set the context of an object. More... | |
string | Handle [get] |
Used to access the unique Handle of a Lua object. More... | |
bool | IsExposed [get] |
Used to track if an object has been exposed to Lua. More... | |
string | Name [get] |
Used to access the name of an object. More... | |
Class structure exposed to Lua. You should use this class as a base for your API data structures.
Instances of this class are automatically exposed to Lua. All public members of derived classes will also be exposed to Lua. Inherits LuaClass.
|
inline |
Public constructor. Exposes this object to Lua.
If the object is exposed here, this method will also invoke an OnLoad callback.
Name | Sets the name of the object exposed to Lua. |
Context | Sets the context of the object exposed to Lua. |
ExposeOnInit | (Optional) Enables/disables the automatic exposure of this object to Lua. |
EnableObjectScript | (Optional) If set to true, executes a resource script after exposing the object to Lua. Resource scripts are only executed for objects which are globals in Lua (i.e. Context is set to null). |