Fix for selecting correct classdatabasefile for closest Unity version…#59
Open
wh0am15533 wants to merge 1 commit intonesrak1:assetstoolsv2from
Open
Fix for selecting correct classdatabasefile for closest Unity version…#59wh0am15533 wants to merge 1 commit intonesrak1:assetstoolsv2from
wh0am15533 wants to merge 1 commit intonesrak1:assetstoolsv2from
Conversation
nesrak1
reviewed
Jan 3, 2022
Owner
nesrak1
left a comment
There was a problem hiding this comment.
I apologize, I wrote comments a while ago but forgot to submit the review.
| //may still not work but better than nothing I guess | ||
| //in the future we should probably do a selector | ||
| //like uabe does | ||
| // Modification to find closest Unity version match |
Owner
There was a problem hiding this comment.
I think it would be better to put this inside of LoadClassDatabaseFromPackage, that way it works everywhere rather than just here in AssetsView. It needs to be in a different method than LoadAssetsFile anyway.
| List<ClassDatabaseFile> files = helper.classPackage.files; | ||
|
|
||
| // Filter all classDbFiles for matching versions | ||
| var unityMajMinVer = inst.file.typeTree.unityVersion.Substring(0, 6); |
Owner
There was a problem hiding this comment.
I would be careful about using substring like this since the length of major+minor versions aren't always 6 (for example, 5.0.0f1 first 6 characters are 5.0.0f not 5.0) Just use split for everything so we're sure it's correct.
This file contains hidden or 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
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.
Here that PR you requested for AssetsView selecting the correct ClassDatabaseFile for the closest Unity version instead of just select the last one which will alway's be Unity 5.4.x