private void MapSettings(Settings settings)
        {
            IsEnabled = settings.IsEnabled;
            UnityProjectPath = settings.UnityProjectPath;
            foreach (var item in settings.ProjectSyncItems)
            {
                SyncProjects.Add(item);
            }
            Cache.Instance.ScanProjects.AddRange(SyncProjects.Select(x => new ProjectScanItem
            {
                ProjectGuid = x.ProjectGuid,
                ProjectName = x.ProjectName
            }));

            OnPropertyChanged(nameof(IsSaveEnabled));
        }
        public void Save()
        {
            var settings = new Settings();
            if (IsEnabled)
            {
                settings.IsEnabled = true;
                settings.UnityProjectPath = UnityProjectPath;
                settings.ProjectSyncItems = SyncProjects;
            }

            var oldSettings = Cache.Instance.Settings;
            try
            {
                Cache.Instance.Settings = settings;
                CommonService.SaveSettings();
                ErrorText = null;
            }
            catch (Exception)
            {
                Cache.Instance.Settings = oldSettings;
                ErrorText = "Can't save settings.";
            }

            SynchronizeProjects();
            CommonService.SaveSyncProjectItemsToCache();
        }