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

Optimize Gradient2 when 'ModifyMesh' called #466

Merged
merged 4 commits into from
Apr 21, 2024

Conversation

bluefallsky
Copy link

@bluefallsky bluefallsky commented Jan 28, 2024

Unity UI Extensions - Pull Request

Overview

Gradient2 optimization

Changes

Optimize Garbage when 'ModifyMesh' called, when target graphic's tint color changed or Gradient2 offset, zoom field changed.

Breaking Changes

  • Change List and array constructor to pool rent call
  • Change Default Sort method(DefaultArrayHelper) that generate garbage
  • Cache field 'colorKeys' and 'alphaKeys' that generate garbage when every referece
  • Some unity version support

Related Submodule Changes

None

Testing status

  • No tests have been added.

Manual testing status

https://github.com/bluefallsky/com.unity.uiextensions/tree/enhance/gradient2-optimize
sample scene path - WorkSpace/Gradient2/Gradient2Test.unity
For comparative testing, testing was conducted with Gradient2Optimize.cs

@SimonDarksideJ SimonDarksideJ changed the base branch from release to development February 26, 2024 22:41
@SimonDarksideJ
Copy link
Contributor

Only just seeing this @bluefallsky, sorry for the delay. And WOW Unity, I see some clever flipping with the Unity version checks there.

Will review ASAP. Retargetted to the development branch however.

@SimonDarksideJ SimonDarksideJ merged commit 8301af7 into Unity-UI-Extensions:development Apr 21, 2024
5 checks passed
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.

Android: Gradient2 performance impact
3 participants