private static void InitData() { _iniTool = new IniTool(); _iniTool.Open(UIEditorUtils._configFilePath); _panelUIPath = _iniTool.ReadValue("UI", "PanelPath", ""); _panelCodePath = _iniTool.ReadValue("UIScript", "PanelGeneratedScriptPath", ""); _panelCodePath = Path.Combine(Application.dataPath, _panelCodePath); int index = _panelUIPath.IndexOf("Resources"); _panelUIResPath = _panelUIPath.Substring(index + UIEditorUtils.RESOURCES_LENGTH, _panelUIPath.Length - index - UIEditorUtils.RESOURCES_LENGTH); }
internal static bool CheckUIConfig() { if (!File.Exists(_configFilePath)) { First(); } IniTool iniTool = new IniTool(); iniTool.Open(_configFilePath); string panelPath = iniTool.ReadValue("UI", "PanelPath", ""); string itemPath = iniTool.ReadValue("UI", "ItemPath", ""); string panelScriptPath = iniTool.ReadValue("UIScript", "PanelGeneratedScriptPath", ""); string itemScriptPath = iniTool.ReadValue("UIScript", "ItemGeneratedScriptPath", ""); if (string.IsNullOrWhiteSpace(panelPath) || string.IsNullOrWhiteSpace(itemPath) || string.IsNullOrWhiteSpace(panelScriptPath) || string.IsNullOrWhiteSpace(itemScriptPath)) { return(false); } return(true); }