()
| 158 | } |
| 159 | |
| 160 | private void Save() |
| 161 | { |
| 162 | // Update file |
| 163 | if (Editor.SaveJsonAsset(_optionsFilePath, Options)) |
| 164 | { |
| 165 | MessageBox.Show(string.Format("Failed to save editor option to '{0}'. Ensure that directory exists and program has access to it.", _optionsFilePath), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| 166 | } |
| 167 | |
| 168 | // Special case for editor analytics |
| 169 | var editorAnalyticsTrackingFile = Path.Combine(Editor.LocalCachePath, "noTracking"); |
| 170 | if (Options.General.EnableEditorAnalytics) |
| 171 | { |
| 172 | if (File.Exists(editorAnalyticsTrackingFile)) |
| 173 | { |
| 174 | File.Delete(editorAnalyticsTrackingFile); |
| 175 | } |
| 176 | } |
| 177 | else |
| 178 | { |
| 179 | if (!File.Exists(editorAnalyticsTrackingFile)) |
| 180 | { |
| 181 | File.WriteAllText(editorAnalyticsTrackingFile, "Don't track me, please."); |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | private void OnOptionsChanged() |
| 187 | { |
nothing calls this directly
no test coverage detected