/// <summary> /// Initializes a new instance of the LuaPlugin class /// </summary> /// <param name="filename"></param> internal LuaPlugin(string filename, LuaExtension luaExt, FSWatcher watcher) { // Store filename Filename = filename; this.luaExt = luaExt; LuaEnvironment = luaExt.LuaEnvironment; this.watcher = watcher; }
void Awake() { LuaExtension.DoString("return 20 + 20"); var result = (int)LuaExtension.ToNumber(1); LuaExtension.Pop(1); Debug.Log("result = " + result); }
/// <summary> /// Initializes a new instance of the LuaPlugin class /// </summary> /// <param name="filename"></param> /// <param name="luaExt"></param> /// <param name="watcher"></param> internal LuaPlugin(string filename, LuaExtension luaExt, FSWatcher watcher) { // Store filename Filename = filename; Name = Core.Utility.GetFileNameWithoutExtension(Filename); this.luaExt = luaExt; LuaEnvironment = luaExt.LuaEnvironment; this.watcher = watcher; }
/// <summary> /// Initializes a new instance of the LuaPluginLoader class /// </summary> /// <param name="lua"></param> /// <param name="luaExtension"></param> public LuaPluginLoader(NLua.Lua lua, LuaExtension luaExtension) { LuaEnvironment = lua; LuaExtension = luaExtension; }