Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle missing version file or package manifest #14

Open
Varneon opened this issue Sep 23, 2022 · 0 comments
Open

Handle missing version file or package manifest #14

Varneon opened this issue Sep 23, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Varneon
Copy link
Owner

Varneon commented Sep 23, 2022

If trying to open an export configuration with both version file and package manifest missing, editor will throw a NullReferenceException:

NullReferenceException: Object reference not set to an instance of an object
Varneon.PackageExporter.PackageFileNameUtility.GenerateName (Varneon.PackageExporter.PackageExportConfiguration configuration, System.String versionString) (at Packages/com.varneon.package-exporter/Editor/PackageFileNameUtility.cs:14)
Varneon.PackageExporter.PackageExportConfiguration.GenerateFileName (System.String versionString) (at Packages/com.varneon.package-exporter/Editor/PackageExportConfiguration.cs:153)
Varneon.PackageExporter.ExporterWindow.UpdateOutputFileName () (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:756)
Varneon.PackageExporter.ExporterWindow.SetActiveConfiguration (System.String name) (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:539)
Varneon.PackageExporter.ExporterWindow.LoadPackageConfigurations () (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:501)
Varneon.PackageExporter.ExporterWindow.LoadPackageConfigurationStorages (System.Boolean createNewIfNoneFound) (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:473)
Varneon.PackageExporter.ExporterWindow.OnEnable () (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:308)
UnityEditor.EditorWindow:GetWindow()
Varneon.PackageExporter.ExporterWindow:OpenWindow() (at Packages/com.varneon.package-exporter/Editor/ExporterWindow.cs:296)

Add error handling for this and display a notification for the user link either version file or package manifest to the configuration

@Varneon Varneon added the bug Something isn't working label Sep 23, 2022
@Varneon Varneon self-assigned this Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant