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

feat: add option to not automatically plays tweener effect #280

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

vgArchives
Copy link
Contributor

@vgArchives vgArchives commented Nov 29, 2024

Pull Request Template

Description

Change Summary:
Added a new option on the tweener effect called "StartMode" to set it to not automatically play on start. eg. you have an image with a UIEffect and UIEffectTweener and do not want the effect to play instantly when the object starts but still want to use Normal/Unscaled update mode to not have to tween values manually in code.

Context/Motivation:
I was having an issue where I was using a UIEffect component together with UIEffectTweener and it was tweening my values automatically on start. Since I still wanted to use Normal/Unscaled update mode and did not want to always enable/disable the component I created a new option called StartMode where you can set it to manual and the script will wait until you first call Play() on UIEffectTweener to start modifying the values, also you can keep it on automatic and use the default behavior.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update documentations
  • Others (refactoring, style changes, etc.)

Test environment

  • Platform: Windows
  • Unity version: 2020.3.48f1 / Unity 6000.0.28f1
  • Build options: Mono, URP

Checklist

  • This pull request is for merging into the develop branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

Added a new option on the tweener effect called "StartMode" to set it to not automatically play on start. eg. you have an image with a UIEffect and UIEffecTweener and do not want the effect to play instantly when the object starts but still want to use Normal/Unscaled update mode to not have to tween values manually in code.
@mob-sakai
Copy link
Owner

Thank you for the pull request!
Ah, that makes perfect sense. 👍

@mob-sakai mob-sakai merged commit 9164e14 into mob-sakai:develop Nov 29, 2024
12 checks passed
@vgArchives
Copy link
Contributor Author

Thank you for the pull request! Ah, that makes perfect sense. 👍

Thx! I'm glad to help.

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