const App = CS.FairyEditor.App; const cfgPath = `${App.pluginManager.basePath}/xgame-ext/Config.json`; export default class Config { /**psd2fgui的插件路径,该插件依赖的npm库比较大,单独保存*/ public psd2fguiPluginsPath: string; /**依赖信息清单路径*/ public dependencyManifestPath: string; public wirte() { let config = JSON.stringify(this) CS.System.IO.File.WriteAllText(cfgPath, config) } static load(): Config { if (CS.System.IO.File.Exists(cfgPath) == false) { return null; } let text = CS.System.IO.File.ReadAllText(cfgPath) return JSON.parse(text) as Config } }