Beispiel #1
0
        /// <summary>
        /// 执行Lua方法
        /// </summary>
        public static object[] CallMethod(string module, string func, params object[] args)
        {
            QLuaMgr luaMgr = QFramework.Instance.GetMgr <QLuaMgr>();

            if (luaMgr == null)
            {
                return(null);
            }
            return(luaMgr.CallFunction(module + "." + func, args));
        }
Beispiel #2
0
        /// <summary>
        /// 清理内存
        /// </summary>
        public static void ClearMemory()
        {
            GC.Collect(); Resources.UnloadUnusedAssets();
            QLuaMgr mgr = QFramework.Instance.GetMgr <QLuaMgr>();

            if (mgr != null)
            {
                mgr.LuaGC();
            }
        }