Exemple #1
0
        public void InitCustomCheckItem()
        {
            CheckerConfig cfg = ResourceCheckerPlus.instance.configManager.GetCheckerConfig(checkerName);

            if (cfg.checkItemCfg == null)
            {
                return;
            }
            foreach (var v in cfg.checkItemCfg)
            {
                CheckItem item = CheckItem.CreateCheckItemFromConfig(this, v);
                if (item != null)
                {
                    customCheckItems.Add(item);
                }
            }
        }
        public CheckerConfig GetCheckerConfig(string checkerName)
        {
            CheckerConfig cfg = null;

            checkerConfigDic.TryGetValue(checkerName, out cfg);
            if (cfg == null)
            {
                string path = configRootPath + checkerCfgPath + "/" + checkerName + ".asset";
                cfg = AssetDatabase.LoadAssetAtPath <CheckerConfig>(path);
                if (cfg == null)
                {
                    cfg = ScriptableObject.CreateInstance <CheckerConfig>();
                    AssetDatabase.CreateAsset(cfg, path);
                }
            }
            return(cfg);
        }