Пример #1
0
        private void Awake()
        {
            logger = LogManager.GetInstance().GetLogger(GetType());
            logger.Debug("Awake");
            filterEngine = new FilterEngine();
            if (CineastConfiguration.HasConfig())
            {
                CineastConfiguration config = CineastConfiguration.Load();
                if (!config.IsEmpty())
                {
                    CineastUtils.Configuration = config;
                    logger.Debug("Set configuration!");
                }
                else
                {
                    CineastUtils.Configuration = CineastConfiguration.GetDefault();
                    logger.Warn("Using default configuration!");
                }

                logger.Debug("Successfully loaded config {0}", JsonUtility.ToJson(config));
            }
            else
            {
                logger.Debug("No config found");
                CineastConfiguration.StoreEmpty();
                logger.Debug("Wrote empty config to disk");
            }
        }
Пример #2
0
 private void Awake()
 {
     filterEngine = new FilterEngine();
     if (CineastConfiguration.HasConfig())
     {
         CineastConfiguration config = CineastConfiguration.Load();
         if (!config.IsEmpty())
         {
             CineastUtils.Configuration = config;
         }
         else
         {
             CineastUtils.Configuration = CineastConfiguration.GetDefault();
         }
     }
     else
     {
         CineastConfiguration.StoreEmpty();
     }
 }