mob-sakai / UpmGitExtension

This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
MIT License
773 stars 80 forks source link

UpmPackageVersionEx class throws several error messages #129

Closed chikacc closed 1 year ago

chikacc commented 1 year ago

Describe the bug

UpmPackageVersionEx class throws several error messages in Unity versions 2021.3.21f1, 2022.2.10f1, 2023.1.0b7, or 2023.2.0a5 when UpmGitExtension package is installed. The error message shows that UpmPackageVersionEx is unable to convert the boolean type to UnityEditor.PackageManager.UI.Internal.RegistryType.

To Reproduce

  1. Create a new project in Unity versions 2021.3.21f1, 2022.2.10f1, 2023.1.0b7, or 2023.2.0a5.
  2. Install UpmGitExtension package.
  3. Unity console shown as follows:
Library\PackageCache\com.coffee.upm-git-extension@2.0.2\Editor\Coffee.UpmGitExtension\Extensions\UpmPackageVersionEx.cs(42,46): error CS1503: Argument 3: cannot convert from 'bool' to 'UnityEditor.PackageManager.UI.Internal.RegistryType'
Library\PackageCache\com.coffee.upm-git-extension@2.0.2\Editor\Coffee.UpmGitExtension\Extensions\UpmPackageVersionEx.cs(51,68): error CS1503: Argument 5: cannot convert from 'bool' to 'UnityEditor.PackageManager.UI.Internal.RegistryType'
Library\PackageCache\com.coffee.upm-git-extension@2.0.2\Editor\Coffee.UpmGitExtension\Extensions\UpmPackageVersionEx.cs(60,96): error CS1061: 'UpmPackageVersion' does not contain a definition for 'isUnityPackage' and no accessible extension method 'isUnityPackage' accepting a first argument of type 'UpmPackageVersion' could be found (are you missing a using directive or an assembly reference?)

Expected behavior

No error messages should appear after installing UpmGitExtension package in the Unity versions mentioned above.

Environment:

Additional context

The issue seems to stem from a change made to the UpmPackageVersion class in the Unity PackageManagerUI module. Here are the relevant lines in the UnityCsReference repository:

https://github.com/Unity-Technologies/UnityCsReference/blob/51ea2ccbe18ad3c6328f4d43b00dc74eef3be5ff/Modules/PackageManagerUI/Editor/Services/Upm/UpmPackageVersion.cs#L106

https://github.com/Unity-Technologies/UnityCsReference/blob/51ea2ccbe18ad3c6328f4d43b00dc74eef3be5ff/Modules/PackageManagerUI/Editor/Services/Upm/UpmPackageVersion.cs#L116

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.0.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: