Beispiel #1
0
        /// <summary>
        /// 检查运行环境
        /// </summary>
        public static bool CheckEnvironment()
        {
#if UNITY_EDITOR
            int resultId = Util.CheckRuntimeFile();
            if (resultId == -1)
            {
                Debug.LogError("没有找到框架所需要的资源,单击Game菜单下Build xxx Resource生成!!");
                EditorApplication.isPlaying = false;
                return(false);
            }
            else if (resultId == -2)
            {
                Debug.LogError("没有找到Wrap脚本缓存,单击Lua菜单下Gen Lua Wrap Files生成脚本!!");
                EditorApplication.isPlaying = false;
                return(false);
            }
            if (Application.loadedLevelName == "Test" && !AppConst.DebugMode)
            {
                Debug.LogError("测试场景,必须打开调试模式,AppConst.DebugMode = true!!");
                EditorApplication.isPlaying = false;
                return(false);
            }
#endif
            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// 执行Lua方法
        /// </summary>
        //public static object[] CallMethod(string module, string func, params object[] args)
        //{
        //   // LuaManager luaMgr = AppFacade.Instance.GetManager<LuaManager>(ManagerName.Lua);
        //   // if (luaMgr == null) return null;
        //   // return luaMgr.CallFunction(module + "." + func, args);
        //}

        /// <summary>
        /// 检查运行环境
        /// </summary>
        public static bool CheckEnvironment()
        {
            int resultId = Util.CheckRuntimeFile();

            if (resultId == -1)
            {
                Debug.LogError("没有找到框架所需要的资源,单击Game菜单下Build xxx Resource生成!!");
                //EditorApplication.isPlaying = false;
                return(false);
            }
            if (Application.loadedLevelName == "Test" && !AppConst.DebugMode)
            {
                Debug.LogError("测试场景,必须打开调试模式,AppConst.DebugMode = true!!");
                //EditorApplication.isPlaying = false;
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        /// <summary>
        /// 检查运行环境
        /// </summary>
        public static bool CheckEnvironment()
        {
#if UNITY_EDITOR
            int resultId = Util.CheckRuntimeFile();
            if (resultId == -1)
            {
                Debug.LogError("没有找到框架所需要的资源,单击Game菜单下Build xxx Resource生成!!");
                EditorApplication.isPlaying = false;
                return(false);
            }
            else if (resultId == -2)
            {
                Debug.LogError("没有找到Wrap脚本缓存,单击Lua菜单下Gen Lua Wrap Files生成脚本!!");
                EditorApplication.isPlaying = false;
                return(false);
            }
#endif
            return(true);
        }