Skip to content

Conversation

@wh0am15533
Copy link

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

Copy link
Owner

@nesrak1 nesrak1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants