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

ParticleSystem Trails gain Offset on parent canvas change #323

Closed
serkansenkal opened this issue Aug 7, 2024 · 1 comment
Closed

ParticleSystem Trails gain Offset on parent canvas change #323

serkansenkal opened this issue Aug 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working released

Comments

@serkansenkal
Copy link

Describe the bug
When a GameObject's transform parent is changed to another canvas with different CanvasScaler properties, ParticleSystems using Trail component have visual issue, such as trail being played at an offset position. We believe this is caused due to OnTransformParentChanged being overridden without its base method.

To Reproduce

  1. Create 2 Canvases with CanvasScaler UIScaleMode = ScaleWithScreenSize and with different ReferenceResolution values
  2. Create a GameObject under Canvas1 with following components: UIParticle, ParticleSystem with a proper trail component
  3. Change GameObjects parent to Canvas2 without changing local scale values during runtime.
  4. Trail will be played with an offset
  5. To fix during runtime simply disable and enable GameObject

Expected behavior
OnTransformParentChanged should be called to properly cache right canvas

Environment (please complete the following information):

  • Version [e.g. 4.9.0]
  • Platform: [Editor(Windows/Mac), Standalone(iOS, Android)]
  • Unity version: [2021.3.38f1 & 2022.3.3.37f1]

Additional context
Removing OnTransformParentChanged overridden method on UIParticle.cs fixed the issue for us.

@serkansenkal serkansenkal added the bug Something isn't working label Aug 7, 2024
github-actions bot pushed a commit that referenced this issue Aug 7, 2024
## [4.9.1](v4.9.0...v4.9.1) (2024-08-07)

### Bug Fixes

* ParticleSystem trails gain offset on parent canvas change ([2a1cd50](2a1cd50)), closes [#323](#323)
Copy link

github-actions bot commented Aug 7, 2024

🎉 This issue has been resolved in version 4.9.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue Aug 7, 2024
## [4.9.1](v4.9.0...v4.9.1) (2024-08-07)

### Bug Fixes

* ParticleSystem trails gain offset on parent canvas change ([2a1cd50](2a1cd50)), closes [#323](#323)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants