diff --git a/CHANGELOG.md b/CHANGELOG.md index 19a9621..1f09368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [0.6.1] - 2020-10-26 + +### Changed +- Fix crash on initialization. + ## [0.6.0] - 2020-10-17 ### Added @@ -104,6 +109,7 @@ - Support for MacVim on macOS. - Support for Sublime Text 3 on macOS. +[0.6.1]: https://github.com/frarees/easyeditor/compare/v0.6.0...v0.6.1 [0.6.0]: https://github.com/frarees/easyeditor/compare/v0.5.1...v0.6.0 [0.5.1]: https://github.com/frarees/easyeditor/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/frarees/easyeditor/compare/v0.4.3...v0.5.0 diff --git a/Editor/EasyEditor.asmdef b/Editor/EasyEditor.asmdef index 1f0d267..32c303d 100644 --- a/Editor/EasyEditor.asmdef +++ b/Editor/EasyEditor.asmdef @@ -8,7 +8,7 @@ ], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [], "autoReferenced": false, "defineConstraints": [], diff --git a/Editor/ExternalCodeEditor.cs b/Editor/ExternalCodeEditor.cs index 081a79b..6d2e905 100644 --- a/Editor/ExternalCodeEditor.cs +++ b/Editor/ExternalCodeEditor.cs @@ -55,6 +55,11 @@ private static bool SupportsExtension(string path) private static void OnAfterAssemblyReload() { + if (!Registry.Instance) + { + return; + } + if (Registry.Instance.TryGetDiscoveryFromEditorPath(CodeEditor.CurrentEditorInstallation, out Discovery discovery)) { if (discovery.AutoGenerate) @@ -71,10 +76,7 @@ private static void OnBeforeAssemblyReload() private ExternalCodeEditor() { - if (Registry.LoadInstance()) - { - Installations = Registry.Instance.GetInstallations(); - } + Installations = Registry.LoadInstance() ? Registry.Instance.GetInstallations() : new CodeEditor.Installation[] { }; } public void Initialize(string editorInstallationPath) diff --git a/Editor/Reflected/EasyEditor.Reflected.asmdef b/Editor/Reflected/EasyEditor.Reflected.asmdef index 0fad280..0d3cd4c 100644 --- a/Editor/Reflected/EasyEditor.Reflected.asmdef +++ b/Editor/Reflected/EasyEditor.Reflected.asmdef @@ -6,7 +6,7 @@ ], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [], "autoReferenced": false, "defineConstraints": [], diff --git a/package.json b/package.json index dcb836f..a7c6e8b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "com.frarees.easyeditor", - "version": "0.6.0", + "version": "0.6.1", "displayName": "Easy Editor", "description": "Support external editors with ease.", "unity": "2019.2", - "documentationUrl": "https://github.com/frarees/easyeditor/tree/v0.6.0", - "changelogUrl": "https://github.com/frarees/easyeditor/blob/v0.6.0/CHANGELOG.md", - "licensesUrl": "https://github.com/frarees/easyeditor/blob/v0.6.0/LICENSE.md", + "documentationUrl": "https://github.com/frarees/easyeditor/tree/v0.6.1", + "changelogUrl": "https://github.com/frarees/easyeditor/blob/v0.6.1/CHANGELOG.md", + "licensesUrl": "https://github.com/frarees/easyeditor/blob/v0.6.1/LICENSE.md", "keywords": [ "editor" ],