예제 #1
0
        /// <summary>
        /// Get Config from the CEngineConfig file through key
        /// </summary>
        public static string GetConfig(string key)
        {
            EnsureConfigTab();

            var conf = Confs.FindByPrimaryKey(key);

            if (conf == null)
            {
                CDebug.LogError("Cannot get CosmosConfig: {0}", key);
                return(null);
            }
            return(conf.Value);
        }
예제 #2
0
        /// <summary>
        /// Get Config from the CEngineConfig file through key
        /// </summary>
        public static string GetConfig(string key, bool showLog = true)
        {
            EnsureConfigTab();

            var conf = _configsTable.FindByPrimaryKey(key);

            if (conf == null)
            {
                if (showLog)
                {
                    Logger.LogError("Cannot get CosmosConfig: {0}", key);
                }
                return(null);
            }
            return(conf.Value);
        }