public void Init()
        {
            try
            {
                //读取配置文件
                string json = File.ReadAllText(Global.CONFIG_PATH);
                if (!string.IsNullOrEmpty(json))
                {
                    _vo = JsonConvert.DeserializeObject <ConfigVO>(json);
                }
            }
            catch
            {
                Console.WriteLine("已自动生成config.json, 使用方法参考「README.md」");
            }

            if (null == _vo)
            {
                _vo = new ConfigVO();
                SaveVO();
            }

            if (null != Global.outputDir)
            {
                _vo.copyPath = Global.outputDir;
                SaveVO();
            }
        }
Exemple #2
0
 private void OnFindFinished(FindAssetBundlesCommand cmd, List <AssetBundleItemVO> list)
 {
     abList       = list;
     cfg          = cmd.cfg;
     viewClassNS  = cfg.viewClassNS;
     _isFindingAB = false;
 }
Exemple #3
0
 private void OnEnable()
 {
     cfg = LoadConfig <ConfigVO>(CONFIG_NAME);
     if (null == cfg.resDir)
     {
         cfg.resDir = "." + Path.DirectorySeparatorChar;
     }
 }
 private void OnEnable()
 {
     cfg = EditorConfigUtil.LoadConfig <ConfigVO>(CONFIG_NAME);
     if (null == cfg)
     {
         cfg = new ConfigVO();
     }
 }
 public SyncProtosEditorModule(EditorWindow editorWin) : base(editorWin)
 {
     _cfg            = LoadConfig();
     protoDir        = _cfg.protoDir;
     generateToolEXE = _cfg.generateToolEXE;
     localClassDir   = _cfg.localClassDir;
     protoSources    = _cfg.protoSources;
 }
 public IOSProjectInitConfig()
 {
     Cfg = EditorConfigUtil.LoadConfig <ConfigVO>(CONFIG_NAME);
     if (null == Cfg)
     {
         Cfg = new ConfigVO();
         SaveCfg();
     }
 }
Exemple #7
0
        public GenerateLinkXMLModule(EditorWindow editorWin) : base(editorWin)
        {
            _cfg = EditorConfigUtil.LoadConfig <ConfigVO>(CONFIG_NAME);
            if (null == _cfg.includeDirs)
            {
                _cfg.includeDirs = new List <string>();
            }
            if (null == _cfg.includeDlls)
            {
                _cfg.includeDlls = new List <string>();
            }

            includeDirs = _cfg.includeDirs;
            includeDlls = _cfg.includeDlls;

            CheckExistsAndRefreshPreviewList();
        }
Exemple #8
0
        private void OnEnable()
        {
            cfg = LoadConfig <ConfigVO>(CONFIG_NAME);

            if (cfg.data.startupResGroups == null)
            {
                cfg.data.startupResGroups = new string[0];
            }

            if (cfg.data.settingJump == null)
            {
                cfg.data.settingJump = new Dictionary <string, string>();
            }

            if (cfg.data.startupParams == null)
            {
                cfg.data.startupParams = new Dictionary <string, string>();
            }
        }
        private void OnEnable()
        {
            cfg = EditorConfigUtil.LoadConfig <ConfigVO>(CONFIG_NAME);

            if (cfg.data.startupResGroups == null)
            {
                cfg.data.startupResGroups = new string[0];
            }

            if (cfg.data.settingJump == null)
            {
                cfg.data.settingJump = new Dictionary <string, string>();
            }

            if (cfg.data.startupParams == null)
            {
                cfg.data.startupParams = new Dictionary <string, string>();
            }

            _startParamsDic.SetData(cfg.data.startupParams, "Key", "Value");
            _settingJumpDic.SetData(cfg.data.settingJump, "版本号", "跳转地址");
        }
        public GenerateLinkXMLModule(EditorWindow editorWin) : base(editorWin)
        {
            _cfg = EditorConfigUtil.LoadConfig <ConfigVO>(CONFIG_NAME);
            if (null == _cfg.includeDirs)
            {
                _cfg.includeDirs = new List <string>();
            }
            if (null == _cfg.includeDlls)
            {
                _cfg.includeDlls = new List <string>();
            }

            var defaultDir = FileSystem.CombineDirs(true, EditorApplication.applicationContentsPath);

            if (false == _cfg.includeDirs.Contains(defaultDir))
            {
                _cfg.includeDirs.Add(defaultDir);
            }

            includeDirs = _cfg.includeDirs;
            includeDlls = _cfg.includeDlls;

            RefreshPreviewList();
        }
Exemple #11
0
 private void OnEnable()
 {
     cfg = LoadConfig <ConfigVO>(CONFIG_NAME);
 }