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

Newer Unity versions seem to remove the need for Rebinders. #1

Closed
OscarAbraham opened this issue Mar 11, 2021 · 2 comments
Closed

Newer Unity versions seem to remove the need for Rebinders. #1

OscarAbraham opened this issue Mar 11, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@OscarAbraham
Copy link
Owner

It seems recent Unity versions are a lot more efficient when binding multiple fields separately: https://github.com/needle-mirror/com.unity.ui/blob/7ae45176671504f37ebb5a5c3bacdc63cb692837/Editor/Bindings/BindingExtensions.cs#L854

I still need to take a good look there, but it seems that it'd be better to bind/rebind each element immediately instead of using the rebinder system. I'd gladly appreciate any insight that anyone has about this. Anyway, if my hunch results true, there's a decision to make:

  • We could use # if UNITY_2020_2_OR_NEWER conditionals to try to take advantage of the upgrade.
  • We could release a version 2 without the concept of Rebinders, that targets 2020.2. Personally, I'm no longer using 2019.4 because I need generic serialization; so I'm okay with that.

I'm a lot more inclined to do the second option. I'm no longer using 2019.4 because I need generics serialization; so I'm okay with ditching older versions. It just seems easier and more practical. That said, a version 2 doesn't necessarily need to remove support for older Unity versions in the manifest; things should still work there, just a lot slower. I'd be probably okay; I believe things would also be slower in earlier versions of 2020.2, anyway. That's another decision to ponder, though.

@OscarAbraham OscarAbraham added enhancement New feature or request help wanted Extra attention is needed labels Mar 11, 2021
@OscarAbraham
Copy link
Owner Author

OscarAbraham commented Mar 11, 2021

I took some time to look at the mirrored uitoolkit implementation, and I'm pretty sure the rebinding system is not needed anymore. I wish the uitoolkit code in the current official CSReference repository wasn't so old; I would have realized this much sooner.

Unity version Unity 2020.3 LTS has been released today and people I work with have agreed to start using it; I have even less reasons to support 2019.4 now, so I'll make a version 2 of UITKEditorAid without support for it. Looking at Unity's code, it seems a lot of the improvements also apply to 2020.1 but I'm not really sure. I've never used 2020.1, and I don't know why anyone would use it now so, unless someone asks for it, I'll drop support for it too.

I'm pretty sure no one online will probably tell me their opinion, as I'm really just talking to myself, but writing this was a lot quicker than pondering if I should do it.

@OscarAbraham
Copy link
Owner Author

I've released 2.0.0 without all that rebinder stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant