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

Unity 2023 no longer supported #13

Open
ScienceRocket opened this issue Mar 6, 2023 · 2 comments
Open

Unity 2023 no longer supported #13

ScienceRocket opened this issue Mar 6, 2023 · 2 comments

Comments

@ScienceRocket
Copy link

I recently upgraded to Unity 2023 (beta) and this tool is no longer working.
Think they might have change the way their "selectedSizeIndex" works, as this is what is happing.

To replicate, just run the tool and you will get an exception, back tacking that will lead you to this

PropertyInfo selectedSizeIndex = Types.gameView.GetProperty("selectedSizeIndex", BindingFlags.Instance | BindingFlags.NonPublic);
selectedSizeIndex.SetValue(gameView, index, null);

This is in GameViewSizeHelper.cs

@takanakahiko
Copy link
Contributor

Thank you for your report!

We need to insert code to switch the behavior depending on the version.
I can't respond right now, so any PRs that fix this issue would be greatly appreciated.

@VanQQChose
Copy link

Binding must have somehow become public since then, this is corrected just by adding the BindingsFlag.Public to the GetProperty.
PropertyInfo selectedSizeIndex = Types.gameView.GetProperty("selectedSizeIndex", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic);

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

No branches or pull requests

3 participants