-
Notifications
You must be signed in to change notification settings - Fork 134
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
Compare API versions ignoring missing build numbers #1807
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes RIDER-49130
OnValidate is now documented in 2018.4, 2019.4, and 2020.1. |
Ah! Thanks for the heads up. I'll update the API specs to show that - makes them a little more complicated, but I think it will still work ok. |
Sorry, my comment was for MonoBehaviour. Any chance it can be added there as well? Or should that be another ticket? |
You are right, I don't know what I was thinking. Sorry for the churn. |
No worries 😄 |
krasnotsvetov
approved these changes
Aug 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rider 2020.2 updated API information for
ScriptableObject.OnValidate
. It is undocumented up to Unity 2020.1, and documented from Unity 2020.2. The implementation ofVersion.CompareTo
will treat missing build and revision numbers as older, so a maximum API version of 2020.1 is less than the product version of 2020.1.1, and since this is also less than 2020.2, Rider does not find a record forScriptableObject.OnValidate
.This change introduces an extension method for
Version
-CompareToLenient
. This will only compare the components of both versions that are defined, so2020.1
is considered equal to2020.1.1
. This fixes the issue forScriptableObject.OnValidate
.Fixes RIDER-49130