Compare commits

..

8 Commits

Author SHA1 Message Date
semantic-release-bot
b58498c10f chore(release): 5.0.0-preview.19 [skip ci]
# [5.0.0-preview.19](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.18...5.0.0-preview.19) (2026-06-28)

* feat!: optimize camera settings in overlay render mode ([dc16e64](dc16e6458e))

### BREAKING CHANGES

* the default value of `UIParticleProjectSettings.defaultViewSizeForBaking` has been changed from `10` to `1000`. In some cases, the appearance of certain effects may change.
2026-06-28 11:02:29 +00:00
mob-sakai
dc16e6458e feat!: optimize camera settings in overlay render mode
BREAKING CHANGE: the default value of `UIParticleProjectSettings.defaultViewSizeForBaking` has been changed from `10` to `1000`. In some cases, the appearance of certain effects may change.
2026-06-28 20:01:12 +09:00
semantic-release-bot
34453a0163 chore(release): 5.0.0-preview.18 [skip ci]
# [5.0.0-preview.18](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.17...5.0.0-preview.18) (2026-06-26)

### Bug Fixes

* `ParticleSystemPreviewer` is no longer included in build ([bad976c](bad976cf01))
* `UI/Additive` shader does not support RectMask2D softness. ([83145d3](83145d3a6e))
* add support for Unity 6.7 ([26fd3da](26fd3da20b)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408)
* rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](10f82a8579))
* Support for skipping "reload domain" ([b7bb112](b7bb1124f6)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406)
* there is a compilation error in Unity 2019.2 or earlier ([c327632](c327632e1e)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407)

### Features

* add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](ea2fcfd809)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399)
* preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](108bcfbd24))
* project-wide default view size for baking ([8e0ff10](8e0ff10c73)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360)
2026-06-26 03:05:47 +00:00
mob-sakai
6b54e7cce8 Merge remote-tracking branch 'origin/develop' into develop-preview
# Conflicts:
#	Packages/src/CHANGELOG.md
#	Packages/src/README.md
#	Packages/src/package.json
2026-06-26 12:05:08 +09:00
semantic-release-bot
5393947b3b chore(release): 4.13.1 [skip ci]
## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26)

### Bug Fixes

* `ParticleSystemPreviewer` is no longer included in build ([bad976c](bad976cf01))
* add support for Unity 6.7 ([26fd3da](26fd3da20b)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408)
2026-06-26 02:57:47 +00:00
mob-sakai
bad976cf01 fix: ParticleSystemPreviewer is no longer included in build 2026-06-26 11:55:28 +09:00
mob-sakai
26fd3da20b fix: add support for Unity 6.7
close #408
2026-06-26 11:51:43 +09:00
semantic-release-bot
9eb094bb43 chore(release): 4.13.0 [skip ci]
# [4.13.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.2...v4.13.0) (2026-06-25)

### Bug Fixes

* `UI/Additive` shader does not support RectMask2D softness. ([83145d3](83145d3a6e))
* rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](10f82a8579))
* Support for skipping "reload domain" ([b7bb112](b7bb1124f6)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406)
* there is a compilation error in Unity 2019.2 or earlier ([c327632](c327632e1e)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407)

### Features

* add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](ea2fcfd809)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399)
* preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](108bcfbd24))
* project-wide default view size for baking ([8e0ff10](8e0ff10c73)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360)
2026-06-25 11:18:58 +00:00
8 changed files with 288 additions and 43 deletions

View File

@@ -1,27 +1,100 @@
# [5.0.0-preview.17](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.16...5.0.0-preview.17) (2026-06-08) # [5.0.0-preview.19](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.18...5.0.0-preview.19) (2026-06-28)
* feat!: optimize camera settings in overlay render mode ([dc16e64](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/dc16e6458e855c451ab73e9c4cd418ef65f8b350))
### BREAKING CHANGES
* the default value of `UIParticleProjectSettings.defaultViewSizeForBaking` has been changed from `10` to `1000`. In some cases, the appearance of certain effects may change.
# [5.0.0-preview.18](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.17...5.0.0-preview.18) (2026-06-26)
### Bug Fixes
* `ParticleSystemPreviewer` is no longer included in build ([bad976c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/bad976cf01180bdabf5cd2f1760e069afdcb644a))
* `UI/Additive` shader does not support RectMask2D softness. ([83145d3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/83145d3a6ede3831d1f7c49afde6ef7d8a498d21))
* add support for Unity 6.7 ([26fd3da](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/26fd3da20b6b07f7a26df662358c53757a7cc5f5)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408)
* rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/10f82a8579a2d055f897e7a8d6f3b5ba1fc43ae8))
* Support for skipping "reload domain" ([b7bb112](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b7bb1124f6921ebca1b48991462637767b95e504)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406)
* there is a compilation error in Unity 2019.2 or earlier ([c327632](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c327632e1eb203351ba1a1087a19eb7838c22530)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407)
### Features
* add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ea2fcfd8099a24b92624d34600beb519fb9d2b38)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399)
* preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/108bcfbd246960dc730546dc334424cf2e17bfd4))
* project-wide default view size for baking ([8e0ff10](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8e0ff10c7344d9f53d2f4f096ddeb7392b67f930)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360)
## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26)
### Bug Fixes
* `ParticleSystemPreviewer` is no longer included in build ([bad976c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/bad976cf01180bdabf5cd2f1760e069afdcb644a))
* add support for Unity 6.7 ([26fd3da](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/26fd3da20b6b07f7a26df662358c53757a7cc5f5)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408)
# [4.13.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.2...v4.13.0) (2026-06-25)
### Bug Fixes
* `UI/Additive` shader does not support RectMask2D softness. ([83145d3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/83145d3a6ede3831d1f7c49afde6ef7d8a498d21))
* rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/10f82a8579a2d055f897e7a8d6f3b5ba1fc43ae8))
* Support for skipping "reload domain" ([b7bb112](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b7bb1124f6921ebca1b48991462637767b95e504)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406)
* there is a compilation error in Unity 2019.2 or earlier ([c327632](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c327632e1eb203351ba1a1087a19eb7838c22530)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407)
### Features
* add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ea2fcfd8099a24b92624d34600beb519fb9d2b38)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399)
* preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/108bcfbd246960dc730546dc334424cf2e17bfd4))
* project-wide default view size for baking ([8e0ff10](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8e0ff10c7344d9f53d2f4f096ddeb7392b67f930)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360)
## [4.12.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.1...v4.12.2) (2026-06-08)
### Bug Fixes ### Bug Fixes
* add `meshCleared` flag to optimize mesh clearing ([859fa20](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/859fa20d297c3f44e3361f20dbb7ce966407e03e)) * add `meshCleared` flag to optimize mesh clearing ([859fa20](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/859fa20d297c3f44e3361f20dbb7ce966407e03e))
* add early return for case where subEmitter module is disabled ([d1386a1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d1386a12216743a6e09f1b9b87bea1dfcf7702e4))
* avoid endless loop ([eb2e862](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/eb2e862e80e549c8cf16ddfed776c101c2413bac)), closes [#392](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/392)
* fix icon ([a9461ec](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a9461ecb4d40d7fe878e12465d6e38faae7ae65b))
* fix Unity6.5 compile errors and warnings ([a5ee687](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a5ee6878212be2fc4d7b48879426f239e8753009)), closes [#400](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/400) * fix Unity6.5 compile errors and warnings ([a5ee687](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a5ee6878212be2fc4d7b48879426f239e8753009)), closes [#400](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/400)
* fix URL link in README ([a79ffb2](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a79ffb2c2b4c26f23d2925cb18674fda5d8bc9cb))
* fix URL link in README ([1c8c65d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1c8c65d25e7f6fe7b1d20da4461333df8fc7578e)), closes [#376](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/376)
* fix: second and subsequent bursts not displayed when world simulation and non-looping ([df2f3ca](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/df2f3caafbe279f1457d74f8183cb561ac14aa17)), closes [#326](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/326)
* ignore "EditorOnly" tagged gameObjects on refresh ([031d46a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/031d46a3216c942d2d1a6ccfadf5f0b9e3ce3006))
* potential access to UIParticleRenderer that has already been destroyed ([b740dd6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b740dd662d423c6bef849662ce1b0bfbb4940ed4)), closes [#403](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/403) * potential access to UIParticleRenderer that has already been destroyed ([b740dd6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b740dd662d423c6bef849662ce1b0bfbb4940ed4)), closes [#403](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/403)
* UIParticle in canvas with 0f-0.01f alpha value does not start to play until alpha value is greater than 0.01f, causes play calls to be delayed unintentionally if canvas alpha value is set to mentioned value range ([38aec2e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/38aec2ea1afd77677d629c86665a3342d92e49d9))
* updated support for some changed menu paths ([f8ac986](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f8ac9869f141238169730e74f5d65c4fc6081f51)), closes [#397](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/397) * updated support for some changed menu paths ([f8ac986](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f8ac9869f141238169730e74f5d65c4fc6081f51)), closes [#397](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/397)
## [4.12.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.0...v4.12.1) (2026-03-24)
### Bug Fixes
* ignore "EditorOnly" tagged gameObjects on refresh ([031d46a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/031d46a3216c942d2d1a6ccfadf5f0b9e3ce3006))
# [4.12.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.11.4...v4.12.0) (2026-03-24)
### Features ### Features
* explicit null checks ([5384f61](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5384f61c569e9f78ff9d5b45acfc6f5c2f021a87)) * explicit null checks ([5384f61](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5384f61c569e9f78ff9d5b45acfc6f5c2f021a87))
# [5.0.0-preview.16](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.15...5.0.0-preview.16) (2025-03-15) ## [4.11.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.11.3...v4.11.4) (2025-12-24)
### Bug Fixes
* add early return for case where subEmitter module is disabled ([d1386a1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d1386a12216743a6e09f1b9b87bea1dfcf7702e4))
* avoid endless loop ([eb2e862](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/eb2e862e80e549c8cf16ddfed776c101c2413bac)), closes [#392](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/392)
## [4.11.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.11.2...v4.11.3) (2025-10-14)
### Bug Fixes
* fix icon ([a9461ec](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a9461ecb4d40d7fe878e12465d6e38faae7ae65b))
* fix URL link in README ([1c8c65d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1c8c65d25e7f6fe7b1d20da4461333df8fc7578e)), closes [#376](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/376)
* fix: second and subsequent bursts not displayed when world simulation and non-looping ([df2f3ca](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/df2f3caafbe279f1457d74f8183cb561ac14aa17)), closes [#326](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/326)
* UIParticle in canvas with 0f-0.01f alpha value does not start to play until alpha value is greater than 0.01f, causes play calls to be delayed unintentionally if canvas alpha value is set to mentioned value range ([38aec2e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/38aec2ea1afd77677d629c86665a3342d92e49d9))
## [4.11.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.11.1...v4.11.2) (2025-03-15)
### Bug Fixes ### Bug Fixes
@@ -29,20 +102,28 @@
* IL2CPP build fails on older versions of Unity ([0da6525](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0da652520cd165b43de7404c0b0ab1fbcf9349d1)) * IL2CPP build fails on older versions of Unity ([0da6525](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0da652520cd165b43de7404c0b0ab1fbcf9349d1))
* NRE on enable ([0cff50e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0cff50ef696aa53fb7c46a9a737b7cf3a05b7b9b)), closes [#359](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/359) * NRE on enable ([0cff50e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0cff50ef696aa53fb7c46a9a737b7cf3a05b7b9b)), closes [#359](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/359)
# [5.0.0-preview.15](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.14...5.0.0-preview.15) (2025-02-21) ## [4.11.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.11.0...v4.11.1) (2025-02-21)
### Bug Fixes ### Bug Fixes
* component icons will no longer be displayed in the scene view ([6dfbdae](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/6dfbdae38d3822ab9c2c6f0e4ca1ca32ee98a239)) * component icons will no longer be displayed in the scene view ([6dfbdae](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/6dfbdae38d3822ab9c2c6f0e4ca1ca32ee98a239))
* editor crashed on exit play mode (editor, windows) ([47ee45c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/47ee45cbbe651a8f87ca2b8a3948f8b88db8211e)), closes [#351](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/351)
# [4.11.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.7...v4.11.0) (2025-02-21)
### Features ### Features
* add 'TimeScaleMultiplier' option ([925af0b](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/925af0b6046f65f23a778f67cefa8ff9cbedb513)) * add 'TimeScaleMultiplier' option ([925af0b](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/925af0b6046f65f23a778f67cefa8ff9cbedb513))
# [5.0.0-preview.14](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.13...5.0.0-preview.14) (2025-01-03) ## [4.10.7](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.6...v4.10.7) (2025-01-14)
### Bug Fixes
* editor crashed on exit play mode (editor, windows) ([47ee45c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/47ee45cbbe651a8f87ca2b8a3948f8b88db8211e)), closes [#351](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/351)
## [4.10.6](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.5...v4.10.6) (2025-01-03)
### Bug Fixes ### Bug Fixes
@@ -50,19 +131,6 @@
* sub-emitter particles may not render correctly in certain scenarios ([8276684](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8276684c3b1646f0490ed64557547ba15281664a)), closes [#348](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/348) * sub-emitter particles may not render correctly in certain scenarios ([8276684](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8276684c3b1646f0490ed64557547ba15281664a)), closes [#348](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/348)
* sub-emitter's `inherit velocity` module doubles at runtime ([67de3d1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/67de3d1bd3e16dc9b564625cb990c53d75769506)), closes [#349](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/349) * sub-emitter's `inherit velocity` module doubles at runtime ([67de3d1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/67de3d1bd3e16dc9b564625cb990c53d75769506)), closes [#349](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/349)
# [5.0.0-preview.13](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.12...5.0.0-preview.13) (2025-01-03)
### Features
* change the default value of `UIParticle.scale` from `10` to `1` ([9955eef](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9955eefdc22cf565502f85c87cd2efd3a25fbe50))
* UIParticle no longer inherits from MaskableGraphic ([c09bfb8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c09bfb81abc9179bf5fc49d29eaf7fc4ed01a4dc))
### BREAKING CHANGES
* Some members inherited from MaskableGraphic will no longer be available.
## [4.10.5](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.4...v4.10.5) (2024-12-23) ## [4.10.5](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.4...v4.10.5) (2024-12-23)

View File

@@ -36,6 +36,7 @@ You can render, mask, and sort your `ParticleSystems` for UI without the need fo
- [Usage with `Mask` or `RectMask2D` Component](#usage-with-mask-or-rectmask2d-component) - [Usage with `Mask` or `RectMask2D` Component](#usage-with-mask-or-rectmask2d-component)
- [Usage with Script](#usage-with-script) - [Usage with Script](#usage-with-script)
- [Component: UIParticleAttractor](#component-uiparticleattractor) - [Component: UIParticleAttractor](#component-uiparticleattractor)
- [Component: ParticleSystemPreviewer](#component-particlesystempreviewer)
- [Project Settings](#project-settings) - [Project Settings](#project-settings)
- [🛠 Development Note](#-development-note) - [🛠 Development Note](#-development-note)
- [Compares the Baking mesh approach with the conventional approach](#compares-the-baking-mesh-approach-with-the-conventional-approach) - [Compares the Baking mesh approach with the conventional approach](#compares-the-baking-mesh-approach-with-the-conventional-approach)
@@ -161,6 +162,7 @@ _This package requires **Unity 2019.3 or later**._
### Breaking Changes ### Breaking Changes
- The default value of `UIParticle.scale` has been changed from `10` to `1`. - The default value of `UIParticle.scale` has been changed from `10` to `1`.
- The default value of `UIParticleProjectSettings.defaultViewSizeForBaking` has been changed from `10` to `1000`.
- `UIParticle` no longer inherits from `MaskableGraphic`. - `UIParticle` no longer inherits from `MaskableGraphic`.
- If you are installing via git URL, add `?path=Packages/src`. - If you are installing via git URL, add `?path=Packages/src`.
```json ```json
@@ -292,16 +294,17 @@ uiParticle.Stop();
- **Unscaled Time:** Update with unscaled delta time. - **Unscaled Time:** Update with unscaled delta time.
- **OnAttracted**: An event called when attracting is complete (per particle). - **OnAttracted**: An event called when attracting is complete (per particle).
<br><br> <br><br>
### Component: ParticleSystemPreviewer ### Component: ParticleSystemPreviewer
`ParticleSystemPreviewer` is used to preview a ParticleSystem in the editor. `ParticleSystemPreviewer` is used to preview a `ParticleSystem` in the editor.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1782441157549.png)
- When a `GameObject` with this component is selected in the editor, a temporary `ParticleSystem` is added if needed so you can preview the effect in the Scene view. - When a `GameObject` with this component is selected in the editor, a temporary `ParticleSystem` is added if needed so you can preview the effect in the Scene view.
- The generated `ParticleSystem` is marked with `HideFlags.DontSave`, so it is neither saved nor included in builds. - The generated `ParticleSystem` is marked with `HideFlags.DontSave`, so it is neither saved nor included in builds.
- This component will be removed in builds.
<br><br> <br><br>

View File

@@ -0,0 +1,153 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIParticleInternal
{
internal static class MeshExtensions
{
internal static readonly InternalObjectPool<Mesh> s_MeshPool = new InternalObjectPool<Mesh>(
() =>
{
var mesh = new Mesh
{
hideFlags = HideFlags.DontSave | HideFlags.NotEditable
};
mesh.MarkDynamic();
return mesh;
},
mesh => mesh,
mesh =>
{
if (mesh != null)
{
mesh.Clear();
}
});
public static Mesh Rent()
{
return s_MeshPool.Rent();
}
public static void Return(ref Mesh mesh)
{
s_MeshPool.Return(ref mesh);
}
public static void CopyTo(this Mesh self, Mesh dst)
{
if (self == null || dst == null) return;
var vector3List = InternalListPool<Vector3>.Rent();
var vector4List = InternalListPool<Vector4>.Rent();
var color32List = InternalListPool<Color32>.Rent();
var intList = InternalListPool<int>.Rent();
dst.Clear(false);
self.GetVertices(vector3List);
dst.SetVertices(vector3List);
self.GetTriangles(intList, 0);
dst.SetTriangles(intList, 0);
self.GetNormals(vector3List);
dst.SetNormals(vector3List);
self.GetTangents(vector4List);
dst.SetTangents(vector4List);
self.GetColors(color32List);
dst.SetColors(color32List);
self.GetUVs(0, vector4List);
dst.SetUVs(0, vector4List);
self.GetUVs(1, vector4List);
dst.SetUVs(1, vector4List);
self.GetUVs(2, vector4List);
dst.SetUVs(2, vector4List);
self.GetUVs(3, vector4List);
dst.SetUVs(3, vector4List);
dst.RecalculateBounds();
InternalListPool<Vector3>.Return(ref vector3List);
InternalListPool<Vector4>.Return(ref vector4List);
InternalListPool<Color32>.Return(ref color32List);
InternalListPool<int>.Return(ref intList);
}
public static void CopyTo(this VertexHelper self, Mesh dst)
{
if (self == null || dst == null) return;
self.FillMesh(dst);
}
public static void CopyTo(this Mesh self, VertexHelper dst)
{
if (self == null || dst == null) return;
var vertexCount = self.vertexCount;
var indexCount = self.triangles.Length;
self.CopyTo(dst, vertexCount, indexCount);
}
public static void CopyTo(this Mesh self, VertexHelper dst, int vertexCount, int indexCount)
{
if (self == null || dst == null) return;
var positions = InternalListPool<Vector3>.Rent();
var normals = InternalListPool<Vector3>.Rent();
var uv0 = InternalListPool<Vector4>.Rent();
var uv1 = InternalListPool<Vector4>.Rent();
var uv2 = InternalListPool<Vector4>.Rent();
var uv3 = InternalListPool<Vector4>.Rent();
var tangents = InternalListPool<Vector4>.Rent();
var colors = InternalListPool<Color32>.Rent();
var indices = InternalListPool<int>.Rent();
self.GetVertices(positions);
self.GetColors(colors);
self.GetUVs(0, uv0);
self.GetUVs(1, uv1);
self.GetUVs(2, uv1);
self.GetUVs(3, uv1);
self.GetNormals(normals);
self.GetTangents(tangents);
self.GetIndices(indices, 0);
dst.Clear();
for (var i = 0; i < vertexCount; i++)
{
dst.AddVert(positions.GetOrDefault(i), colors.GetOrDefault(i), uv0.GetOrDefault(i), uv1.GetOrDefault(i),
uv2.GetOrDefault(i), uv3.GetOrDefault(i), normals.GetOrDefault(i), tangents.GetOrDefault(i));
}
var count = Mathf.Clamp(indexCount, 0, indices.Count);
for (var i = 0; i < count - 2; i += 3)
{
dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]);
}
InternalListPool<Vector3>.Return(ref positions);
InternalListPool<Vector3>.Return(ref normals);
InternalListPool<Vector4>.Return(ref uv0);
InternalListPool<Vector4>.Return(ref uv1);
InternalListPool<Vector4>.Return(ref uv2);
InternalListPool<Vector4>.Return(ref uv3);
InternalListPool<Vector4>.Return(ref tangents);
InternalListPool<Color32>.Return(ref colors);
InternalListPool<int>.Return(ref indices);
}
private static T GetOrDefault<T>(this List<T> self, int index)
{
return 0 <= index && index < self.Count
? self[index]
: default;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c949d47f5c6d4d22bd7baebc60d48f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Coffee.UIParticleInternal; using Coffee.UIParticleInternal;
@@ -13,7 +14,6 @@ namespace Coffee.UIExtensions
// Do nothing. // Do nothing.
} }
#if UNITY_EDITOR
[CustomEditor(typeof(ParticleSystemPreviewer))] [CustomEditor(typeof(ParticleSystemPreviewer))]
[CanEditMultipleObjects] [CanEditMultipleObjects]
internal class ParticleSystemPreviewerEditor : Editor internal class ParticleSystemPreviewerEditor : Editor
@@ -29,6 +29,7 @@ namespace Coffee.UIExtensions
public override void OnInspectorGUI() public override void OnInspectorGUI()
{ {
base.OnInspectorGUI(); base.OnInspectorGUI();
EditorGUILayout.HelpBox("ParticleSystemPreviewer will be removed in build.", MessageType.Warning);
ParticleSystemPreviewSystem.DrawWarningForTemporary(_gameObjects); ParticleSystemPreviewSystem.DrawWarningForTemporary(_gameObjects);
ParticleSystemPreviewSystem.DrawWarningForPermanent(_gameObjects); ParticleSystemPreviewSystem.DrawWarningForPermanent(_gameObjects);
} }
@@ -43,6 +44,12 @@ namespace Coffee.UIExtensions
{ {
private const HideFlags k_TemporaryHideFlags = HideFlags.DontSave | HideFlags.NotEditable; private const HideFlags k_TemporaryHideFlags = HideFlags.DontSave | HideFlags.NotEditable;
private const string k_TemporaryMesssage = "The temporary ParticleSystem for preview is attached.\n" +
"It will be removed when exiting edit mode.";
private const string k_PermanentMesssage = "The permanent ParticleSystem is attached.\n" +
"It will be included in build.";
[SerializeField] [SerializeField]
private List<GameObject> m_PreviewObjects = new List<GameObject>(); private List<GameObject> m_PreviewObjects = new List<GameObject>();
@@ -192,8 +199,7 @@ namespace Coffee.UIExtensions
{ {
if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasTemporaryParticleSystem)) return; if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasTemporaryParticleSystem)) return;
if (WarningButton("The temporary ParticleSystem for preview is attached.\n" + if (HelpBoxButton(MessageType.Warning, k_TemporaryMesssage, "Remove"))
"It will be removed when exiting edit mode.", "Remove"))
{ {
foreach (var go in gameObjects) foreach (var go in gameObjects)
{ {
@@ -209,8 +215,7 @@ namespace Coffee.UIExtensions
{ {
if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasPermanentParticleSystem)) return; if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasPermanentParticleSystem)) return;
if (WarningButton("The permanent ParticleSystem is attached.\n" + if (HelpBoxButton(MessageType.Info, k_PermanentMesssage, "Remove"))
"It will be included in build.", "Remove"))
{ {
foreach (var go in gameObjects) foreach (var go in gameObjects)
{ {
@@ -224,14 +229,14 @@ namespace Coffee.UIExtensions
} }
} }
private static bool WarningButton(string message, string buttonText) private static bool HelpBoxButton(MessageType messageType, string message, string buttonText)
{ {
EditorGUILayout.BeginHorizontal(); EditorGUILayout.BeginHorizontal();
EditorGUILayout.HelpBox(message, MessageType.Warning, true); EditorGUILayout.HelpBox(message, messageType, true);
var clicked = GUILayout.Button(EditorGUIUtility.TrTempContent(buttonText)); var clicked = GUILayout.Button(EditorGUIUtility.TrTempContent(buttonText));
EditorGUILayout.EndHorizontal(); EditorGUILayout.EndHorizontal();
return clicked; return clicked;
} }
} }
#endif
} }
#endif

View File

@@ -22,7 +22,7 @@ namespace Coffee.UIExtensions
[SerializeField] [SerializeField]
[Tooltip("Default view size for baking particle systems.")] [Tooltip("Default view size for baking particle systems.")]
private float m_DefaultViewSizeForBaking = 10; private float m_DefaultViewSizeForBaking = 1000;
public static float defaultViewSizeForBaking public static float defaultViewSizeForBaking
{ {

View File

@@ -26,6 +26,7 @@ namespace Coffee.UIExtensions
private static readonly List<Material> s_Materials = new List<Material>(2); private static readonly List<Material> s_Materials = new List<Material>(2);
private static MaterialPropertyBlock s_Mpb; private static MaterialPropertyBlock s_Mpb;
private static readonly Vector3[] s_Corners = new Vector3[4]; private static readonly Vector3[] s_Corners = new Vector3[4];
private static readonly VertexHelper s_VertexHelper = new VertexHelper();
private bool _delay; private bool _delay;
private int _index; private int _index;
private bool _isPrevStored; private bool _isPrevStored;
@@ -451,11 +452,15 @@ namespace Coffee.UIExtensions
var components = InternalListPool<Component>.Rent(); var components = InternalListPool<Component>.Rent();
GetComponents(typeof(IMeshModifier), components); GetComponents(typeof(IMeshModifier), components);
for (var i = 0; i < components.Count; i++) if (0 < components.Count)
{ {
#pragma warning disable CS0618 // Type or member is obsolete workerMesh.CopyTo(s_VertexHelper);
((IMeshModifier)components[i]).ModifyMesh(workerMesh); for (var i = 0; i < components.Count; i++)
#pragma warning restore CS0618 // Type or member is obsolete {
((IMeshModifier)components[i]).ModifyMesh(s_VertexHelper);
}
s_VertexHelper.FillMesh(workerMesh);
} }
InternalListPool<Component>.Return(ref components); InternalListPool<Component>.Return(ref components);

View File

@@ -2,7 +2,7 @@
"name": "com.coffee.ui-particle", "name": "com.coffee.ui-particle",
"displayName": "UI Particle", "displayName": "UI Particle",
"description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.", "description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.",
"version": "5.0.0-preview.17", "version": "5.0.0-preview.19",
"unity": "2019.3", "unity": "2019.3",
"license": "MIT", "license": "MIT",
"repository": { "repository": {