public static void Init() { // load custom shortcuts first if (!File.Exists(CustomShortcutsPath)) { File.WriteAllText(CustomShortcutsPath, "[\n]"); } _watcher = new FileSystemWatcher { Path = Editor.Current.EditorDocumentsPath, Filter = "KeyboardShortcuts.json", NotifyFilter = NotifyFilters.LastWrite, EnableRaisingEvents = true, }; _watcher.Changed += (s, e) => ReloadKeymap(); _defaultShortcutsJson = ContentProvider.DownloadString("editor://KeyboardShortcuts.json"); ReloadKeymap(); }
static IconProvider() { _icons = HttpService.JsonDecode <Dictionary <string, string> >( ContentProvider.DownloadString("editor://IconDictionary.json")); }