Compare commits

...

122 Commits

Author SHA1 Message Date
semantic-release-bot d1fa0d143f chore(release): 5.11.8 [skip ci]
## [5.11.8](https://github.com/mob-sakai/UIEffect/compare/5.11.7...5.11.8) (2026-11-06)

### Bug Fixes

* remove conflicting FormerlySerializedAs on UIEffectTweener.m_PlayOnEnable ([55a7f27](https://github.com/mob-sakai/UIEffect/commit/55a7f272042e869e6659f7a2603f9a16dbb3ab65))
2026-11-06 04:01:27 +00:00
armadavalor 55a7f27204 fix: remove conflicting FormerlySerializedAs on UIEffectTweener.m_PlayOnEnable 2026-11-06 12:46:15 +09:00
semantic-release-bot ff824c2341 chore(release): 5.11.7 [skip ci]
## [5.11.7](https://github.com/mob-sakai/UIEffect/compare/5.11.6...5.11.7) (2026-08-27)

### Bug Fixes

* ignore shader registry order changes ([014bba3](https://github.com/mob-sakai/UIEffect/commit/014bba3f5687ecfe41caa00d454f196baf7e3483)), closes [#407](https://github.com/mob-sakai/UIEffect/issues/407)
2026-08-27 08:13:55 +00:00
형군 014bba3f56 fix: ignore shader registry order changes
close #407
2026-08-27 17:11:11 +09:00
semantic-release-bot f533d02977 chore(release): 5.11.6 [skip ci]
## [5.11.6](https://github.com/mob-sakai/UIEffect/compare/5.11.5...5.11.6) (2026-08-17)

### Bug Fixes

* refresh material when changing shadow mode ([8bb782c](https://github.com/mob-sakai/UIEffect/commit/8bb782c90afb42d6569d8dfcfe022b007171f97e))
2026-08-17 08:44:25 +00:00
ZeroGreen86 8bb782c90a fix: refresh material when changing shadow mode 2026-08-17 17:43:18 +09:00
mob-sakai 2617f77c6a chore: test wf 2026-07-23 17:34:01 +09:00
semantic-release-bot 1f4427c3d5 chore(release): 5.11.5 [skip ci]
## [5.11.5](https://github.com/mob-sakai/UIEffect/compare/5.11.4...5.11.5) (2026-07-23)

### Bug Fixes

* fix memory leak ([2dcb7f7](https://github.com/mob-sakai/UIEffect/commit/2dcb7f7e8678a2ffcf3832d0c5011aa1da6c3677)), closes [#405](https://github.com/mob-sakai/UIEffect/issues/405)
2026-07-23 08:29:23 +00:00
mob-sakai 2dcb7f7e86 fix: fix memory leak
close #405
2026-07-23 17:27:24 +09:00
semantic-release-bot 0a4229907d chore(release): 5.11.4 [skip ci]
## [5.11.4](https://github.com/mob-sakai/UIEffect/compare/5.11.3...5.11.4) (2026-07-22)

### Bug Fixes

* infinite asset import loop caused by unchanged ProjectSettings being marked dirty ([dbf8ae0](https://github.com/mob-sakai/UIEffect/commit/dbf8ae00f50470912d458fda853a34ef94d7d533)), closes [#404](https://github.com/mob-sakai/UIEffect/issues/404)
2026-07-22 08:27:02 +00:00
mob-sakai dbf8ae00f5 fix: infinite asset import loop caused by unchanged ProjectSettings being marked dirty
close #404
2026-07-22 15:14:47 +09:00
semantic-release-bot cacb9fde45 chore(release): 5.11.3 [skip ci]
## [5.11.3](https://github.com/mob-sakai/UIEffect/compare/5.11.2...5.11.3) (2026-07-04)

### Bug Fixes

* TextMeshPro support is not working ([9d98096](https://github.com/mob-sakai/UIEffect/commit/9d980961d6cf45e519ad96bf2e7260ed515f0f70)), closes [#402](https://github.com/mob-sakai/UIEffect/issues/402)
2026-07-04 05:53:01 +00:00
mob-sakai 9d980961d6 fix: TextMeshPro support is not working
close #402
2026-07-04 14:40:26 +09:00
semantic-release-bot 399f25db2a chore(release): 5.11.2 [skip ci]
## [5.11.2](https://github.com/mob-sakai/UIEffect/compare/5.11.1...5.11.2) (2026-07-02)

### Bug Fixes

* add null check ([161fc54](https://github.com/mob-sakai/UIEffect/commit/161fc546cad251ad798c2fd9e9472d687aa7f2c3))
2026-07-02 06:57:35 +00:00
mob-sakai 161fc546ca fix: add null check 2026-07-02 15:57:03 +09:00
semantic-release-bot 96f9d09ac7 chore(release): 5.11.1 [skip ci]
## [5.11.1](https://github.com/mob-sakai/UIEffect/compare/5.11.0...5.11.1) (2026-06-29)

### Bug Fixes

* support "disable domain reload" on Unity 6.6 or later ([a556c28](https://github.com/mob-sakai/UIEffect/commit/a556c282210303d9e7a7c284bb4b41ef3a35e3e1))
2026-06-29 05:12:13 +00:00
mob-sakai cb07e1f25e chore: update wf 2026-06-28 20:46:49 +09:00
mob-sakai 7525c782ef chore: update internal 2026-06-28 20:39:19 +09:00
mob-sakai 9aaa0de59d docs: update readme 2026-06-28 19:51:08 +09:00
mob-sakai a556c28221 fix: support "disable domain reload" on Unity 6.6 or later 2026-06-28 13:27:51 +09:00
semantic-release-bot 0fb08bf202 chore(release): 5.11.0 [skip ci]
# [5.11.0](https://github.com/mob-sakai/UIEffect/compare/5.10.9...5.11.0) (2026-06-25)

### Bug Fixes

* enable/disable Gameobject break effect with 'TrueShadow' ([730aa2b](https://github.com/mob-sakai/UIEffect/commit/730aa2bb4d872ddab63f2dad611a063cefa07064)), closes [#400](https://github.com/mob-sakai/UIEffect/issues/400)
* select TMP submesh by mesh before material ([f538ef2](https://github.com/mob-sakai/UIEffect/commit/f538ef2cba3d4d76f6683bccee65d5a9694dad37))
* some fix ([b6b538f](https://github.com/mob-sakai/UIEffect/commit/b6b538f64f0b06ddfb4ad2edd6b7db6dc1d067d8))
* Support for skipping "reload domain" ([ec3fb13](https://github.com/mob-sakai/UIEffect/commit/ec3fb13c111638781bf852e2a4a4747fbfeb7d3a))

### Features

* add option to remove from preloadedAssets when build player ([e955715](https://github.com/mob-sakai/UIEffect/commit/e955715c99c474881e0b27ecc325061ce0d866a0)), closes [#393](https://github.com/mob-sakai/UIEffect/issues/393)
* support XBOX One/Series ([72bb1c5](https://github.com/mob-sakai/UIEffect/commit/72bb1c51318829e7ced3b1436892a5969aedd9a3)), closes [#385](https://github.com/mob-sakai/UIEffect/issues/385) [#394](https://github.com/mob-sakai/UIEffect/issues/394)
2026-06-25 11:09:58 +00:00
mob-sakai 55e3030dd2 chore: update internal 2026-06-25 04:04:35 +09:00
mob-sakai d2c0789375 chore: update shader version 2026-06-25 03:15:54 +09:00
mob-sakai a373cf772b chore: remove Implicit bool conversions 2026-06-25 03:15:54 +09:00
mob-sakai ec3fb13c11 fix: Support for skipping "reload domain" 2026-06-25 03:15:09 +09:00
mob-sakai 514d5f0347 chore: update internal 2026-06-25 03:13:49 +09:00
mob-sakai dfe91edac1 style: fix style 2026-06-22 12:03:03 +09:00
mob-sakai 8f3c990a3a chore: hot-update fix 2026-06-21 16:37:22 +09:00
mob-sakai e8b1b5f89e chore: update internal 2026-06-21 16:36:47 +09:00
mob-sakai ae7ffad789 chore: update readme 2026-06-20 16:14:22 +09:00
mob-sakai c7696c09c0 chore: update internal 2026-06-20 15:36:37 +09:00
mob-sakai b6b538f64f fix: some fix 2026-06-20 15:36:37 +09:00
mob-sakai 730aa2bb4d fix: enable/disable Gameobject break effect with 'TrueShadow'
close #400
2026-06-20 15:36:37 +09:00
mob-sakai 546d603674 chore: add hot-update test 2026-06-20 15:36:37 +09:00
quyong e955715c99 feat: add option to remove from preloadedAssets when build player
close #393
2026-06-20 15:36:37 +09:00
mob-sakai 72bb1c5131 feat: support XBOX One/Series
close #385, close #394
2026-06-20 15:36:37 +09:00
조영록 f538ef2cba fix: select TMP submesh by mesh before material 2026-06-17 18:17:08 +09:00
mob-sakai ae483ec577 update wf 2026-06-17 18:15:27 +09:00
mob-sakai facb78262c chore: fix workflow for pwn request 2026-06-12 16:00:12 +09:00
semantic-release-bot a2c550c523 chore(release): 5.10.9 [skip ci]
## [5.10.9](https://github.com/mob-sakai/UIEffect/compare/5.10.8...5.10.9) (2026-06-08)

### Bug Fixes

* ambiguous call to 'lerp' in shader ([cd68b36](https://github.com/mob-sakai/UIEffect/commit/cd68b364c48e979d6ef227e53a522f096e0df47a)), closes [#390](https://github.com/mob-sakai/UIEffect/issues/390)
* Clarify that the `ShaderGraph support` is available only in Unity 2023.2/6.0 or later ([57031c3](https://github.com/mob-sakai/UIEffect/commit/57031c3e3c2d64ee76d3e568d378cd54a5e84af5)), closes [#391](https://github.com/mob-sakai/UIEffect/issues/391)
* support Unity 6.5 or later ([2d6f7ed](https://github.com/mob-sakai/UIEffect/commit/2d6f7ed63dd83b3f90c2fa6d93a3c84afd6de866)), closes [#392](https://github.com/mob-sakai/UIEffect/issues/392) [#398](https://github.com/mob-sakai/UIEffect/issues/398)
* UIEffect.detailColor is not working ([f3da972](https://github.com/mob-sakai/UIEffect/commit/f3da972c0cba526f7784207c2d8ab48b5dd692f3)), closes [#399](https://github.com/mob-sakai/UIEffect/issues/399)
2026-06-08 09:57:55 +00:00
mob-sakai 44cf12173f chore: ignore alpha for test 2026-06-08 17:41:24 +09:00
mob-sakai d7abcc47f1 update internal code 2026-06-08 17:41:24 +09:00
mob-sakai 57031c3e3c fix: Clarify that the ShaderGraph support is available only in Unity 2023.2/6.0 or later
close #391
2026-06-08 11:05:40 +09:00
mob-sakai cd68b364c4 fix: ambiguous call to 'lerp' in shader
close #390
2026-06-07 20:29:24 +09:00
mob-sakai f3da972c0c fix: UIEffect.detailColor is not working
close #399
2026-06-07 20:11:51 +09:00
mob-sakai 2d6f7ed63d fix: support Unity 6.5 or later
close #392, close #398
2026-06-07 20:06:44 +09:00
semantic-release-bot 70937d2ce3 chore(release): 5.10.8 [skip ci]
## [5.10.8](https://github.com/mob-sakai/UIEffect/compare/5.10.7...5.10.8) (2026-01-16)

### Bug Fixes

* Canvas not properly cached when objects are outside Canvas ([4a4e50e](https://github.com/mob-sakai/UIEffect/commit/4a4e50e01fb50925352c73b27901024494ae933c))
2026-01-16 02:26:09 +00:00
mob-sakai 4a4e50e01f fix: Canvas not properly cached when objects are outside Canvas 2026-01-16 11:24:57 +09:00
semantic-release-bot 815162eab9 chore(release): 5.10.7 [skip ci]
## [5.10.7](https://github.com/mob-sakai/UIEffect/compare/5.10.6...5.10.7) (2025-12-18)

### Bug Fixes

* support Unity 6000.4 ([7fc0c73](https://github.com/mob-sakai/UIEffect/commit/7fc0c7364d8dc39e26eac3c3b79797b139f09817))
2025-12-18 11:20:51 +00:00
mob-sakai 7fc0c7364d fix: support Unity 6000.4 2025-12-18 18:58:52 +09:00
semantic-release-bot 20e7f2fa61 chore(release): 5.10.6 [skip ci]
## [5.10.6](https://github.com/mob-sakai/UIEffect/compare/5.10.5...5.10.6) (2025-12-18)

### Bug Fixes

* fixed an issue where shader variants were not registered automatically ([6b79864](https://github.com/mob-sakai/UIEffect/commit/6b79864a394d79e6ad13f64af1d521fab1f781a7)), closes [#383](https://github.com/mob-sakai/UIEffect/issues/383)
2025-12-18 09:37:32 +00:00
mob-sakai 1b292febb7 chore: update package for development 2025-12-18 18:09:16 +09:00
mob-sakai 6b79864a39 fix: fixed an issue where shader variants were not registered automatically
close #383
2025-12-18 17:27:32 +09:00
semantic-release-bot 4e30651290 chore(release): 5.10.5 [skip ci]
## [5.10.5](https://github.com/mob-sakai/UIEffect/compare/5.10.4...5.10.5) (2025-11-20)

### Bug Fixes

* graphic disappears when changing filters from code ([8776057](https://github.com/mob-sakai/UIEffect/commit/87760570ec7f4e2ca395cfaa0d2ab5d28c9cf9f3)), closes [#382](https://github.com/mob-sakai/UIEffect/issues/382)
2025-11-20 08:12:42 +00:00
mob-sakai 87760570ec fix: graphic disappears when changing filters from code
close #382
2025-11-20 16:56:23 +09:00
semantic-release-bot ef7ac0aaad chore(release): 5.10.4 [skip ci]
## [5.10.4](https://github.com/mob-sakai/UIEffect/compare/5.10.3...5.10.4) (2025-10-27)

### Bug Fixes

* remove `sealed` from `UIEffect` and `UIEffectReplica` ([2fd87e9](https://github.com/mob-sakai/UIEffect/commit/2fd87e909af65bf88a9c39cd157dfb06a56b3af0)), closes [#379](https://github.com/mob-sakai/UIEffect/issues/379)
2025-10-27 10:51:01 +00:00
mob-sakai 2fd87e909a fix: remove sealed from UIEffect and UIEffectReplica
close #379
2025-10-27 19:15:42 +09:00
semantic-release-bot 2cc5c5b68e chore(release): 5.10.3 [skip ci]
## [5.10.3](https://github.com/mob-sakai/UIEffect/compare/5.10.2...5.10.3) (2025-10-22)

### Bug Fixes

* displays as black rectangle when opening editor ([4a8d341](https://github.com/mob-sakai/UIEffect/commit/4a8d341625f73d70c512f7e6f0b864be1adbf459)), closes [#376](https://github.com/mob-sakai/UIEffect/issues/376)
2025-10-22 11:29:36 +00:00
mob-sakai 4a8d341625 fix: displays as black rectangle when opening editor
close #376
2025-10-22 19:32:54 +09:00
semantic-release-bot a885fc5bc1 chore(release): 5.10.2 [skip ci]
## [5.10.2](https://github.com/mob-sakai/UIEffect/compare/5.10.1...5.10.2) (2025-10-16)

### Bug Fixes

* [improve performance] code optimization ([e6fb78a](https://github.com/mob-sakai/UIEffect/commit/e6fb78a0f67ed6f70be08259f674ab2f83364bd7))
2025-10-16 08:11:18 +00:00
mob-sakai 4fdd9636fa chore: update workflow 2025-10-15 18:25:44 +09:00
mob-sakai 06a280ec5a style: format 2025-10-15 17:33:55 +09:00
45375dfhg e6fb78a0f6 fix: [improve performance] code optimization 2025-10-15 12:40:14 +09:00
semantic-release-bot 451cbe4302 chore(release): 5.10.1 [skip ci]
## [5.10.1](https://github.com/mob-sakai/UIEffect/compare/5.10.0...5.10.1) (2025-10-06)

### Bug Fixes

* [improve performance] `UpdateViewMatrix` is called even though (direct-)parent canvas is disabled ([533d7b8](https://github.com/mob-sakai/UIEffect/commit/533d7b8c0a33871b1849fbda862d4fa1899822f4)), closes [#373](https://github.com/mob-sakai/UIEffect/issues/373)
2025-10-06 07:00:33 +00:00
mob-sakai 3cae638bdd chore: game-ci/unity-builder action no longer supports .Net3.5 2025-10-06 15:06:00 +09:00
mob-sakai 533d7b8c0a fix: [improve performance] UpdateViewMatrix is called even though (direct-)parent canvas is disabled
close #373
2025-10-06 10:23:40 +09:00
semantic-release-bot 9380f96572 chore(release): 5.10.0 [skip ci]
# [5.10.0](https://github.com/mob-sakai/UIEffect/compare/5.9.7...5.10.0) (2025-09-26)

### Bug Fixes

* `TmpProxy` causes loss of modifications from other `IMeshModifiers` ([c4202b4](https://github.com/mob-sakai/UIEffect/commit/c4202b45d28fa84567a5671baaef8fa3e3df85dc)), closes [#371](https://github.com/mob-sakai/UIEffect/issues/371)
* display may disappear when using TMP SubMesh (multi-language or sprites, etc.) ([b4adb32](https://github.com/mob-sakai/UIEffect/commit/b4adb325120eeed64af1d9cb2468a1e1e8e10812)), closes [#372](https://github.com/mob-sakai/UIEffect/issues/372)
* TMP Text sprite submesh lost when changing fontMaterial ([59874dd](https://github.com/mob-sakai/UIEffect/commit/59874ddffe356f927dc8ff9b157c54043e149522)), closes [#368](https://github.com/mob-sakai/UIEffect/issues/368)

### Features

* [improve performance] merged apply_color function and reduced shader compilation size ([ce69258](https://github.com/mob-sakai/UIEffect/commit/ce692580a33c0c433fd7fadb64a3dcda0121b2ff))
* [improve performance] various view matrices are only updated when necessary ([6c808aa](https://github.com/mob-sakai/UIEffect/commit/6c808aa3417450fd1ce0fc6fbfe0adffdff9a79a))
2025-09-26 08:30:19 +00:00
mob-sakai b4adb32512 fix: display may disappear when using TMP SubMesh (multi-language or sprites, etc.)
close #372
2025-09-26 09:17:33 +09:00
mob-sakai 59874ddffe fix: TMP Text sprite submesh lost when changing fontMaterial
close #368
2025-09-25 19:26:50 +09:00
mob-sakai c4202b45d2 fix: TmpProxy causes loss of modifications from other IMeshModifiers
close #371
2025-09-25 19:25:58 +09:00
mob-sakai ce692580a3 feat: [improve performance] merged apply_color function and reduced shader compilation size 2025-09-01 19:06:48 +09:00
mob-sakai 6c808aa341 feat: [improve performance] various view matrices are only updated when necessary 2025-09-01 19:05:02 +09:00
semantic-release-bot a975cf347a chore(release): 5.9.7 [skip ci]
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)

### Bug Fixes

* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
2025-09-01 08:50:42 +00:00
mob-sakai 3207105a06 fix: error message sometimes after importing assets
close #365
2025-08-21 16:37:40 +09:00
mob-sakai 4cca2fb5ab fix: flickering issue when scale Y changes when used ShadowMode with TextMeshPro
close #367
2025-08-21 13:11:57 +09:00
mob-sakai d1adb33884 fix: skip monitoring TMP objects that can ignore Y-axis scaling 2025-08-20 08:48:07 +09:00
mob-sakai b077d97ed7 fix: edges of TransitionFilter.Shiny appear sharp
close #366
2025-08-20 08:38:58 +09:00
semantic-release-bot 6f90044ec8 chore(release): 5.9.6 [skip ci]
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)

### Bug Fixes

* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
2025-07-17 10:23:05 +00:00
mob-sakai 83128ebb09 fix: draw calls increase even when using UIEffectReplica
The `UIEffectReplica` component reuses materials as much as possible without creating new ones.
close #364
2025-07-17 19:17:15 +09:00
mob-sakai 9dffdb0ed8 fix: ColorFilter does not output intended color when vertex color is not white
close #363
2025-07-09 20:03:24 +09:00
semantic-release-bot 16be53e145 chore(release): 5.9.5 [skip ci]
## [5.9.5](https://github.com/mob-sakai/UIEffect/compare/5.9.4...5.9.5) (2025-06-26)

### Bug Fixes

* `GetGradientKeys` and `GetTransitionGradientKeys` cannot get GradientMode ([fd2d1b8](https://github.com/mob-sakai/UIEffect/commit/fd2d1b80592ac4ea62e15b6150be63964b113fa2)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
2025-06-26 07:26:57 +00:00
mob-sakai fd2d1b8059 fix: GetGradientKeys and GetTransitionGradientKeys cannot get GradientMode
close #358
2025-06-26 16:25:24 +09:00
semantic-release-bot cf43bfffb9 chore(release): 5.9.4 [skip ci]
## [5.9.4](https://github.com/mob-sakai/UIEffect/compare/5.9.3...5.9.4) (2025-06-25)

### Bug Fixes

* colors specified in UIEffect are output differently in linear color space ([0d7fb1e](https://github.com/mob-sakai/UIEffect/commit/0d7fb1eb63881b67f2658567750a83c92187df35)), closes [#359](https://github.com/mob-sakai/UIEffect/issues/359)
2025-06-25 23:17:34 +00:00
mob-sakai a2f4a2d5c9 refactor 2025-06-26 08:13:17 +09:00
mob-sakai 0d7fb1eb63 fix: colors specified in UIEffect are output differently in linear color space
close #359
2025-06-26 08:11:21 +09:00
semantic-release-bot 145f56968a chore(release): 5.9.3 [skip ci]
## [5.9.3](https://github.com/mob-sakai/UIEffect/compare/5.9.2...5.9.3) (2025-06-23)

### Bug Fixes

* add `GetGradientKeys` and `GetTransitionGradientKeys` APIs ([a0c3e49](https://github.com/mob-sakai/UIEffect/commit/a0c3e4997af181ae16744c53ad3867e2106ccff3)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
* support world canvas without UI events ([cadbb8d](https://github.com/mob-sakai/UIEffect/commit/cadbb8d68d17a2ec7e2d6e8e885d711e61fa53af)), closes [#356](https://github.com/mob-sakai/UIEffect/issues/356) [#357](https://github.com/mob-sakai/UIEffect/issues/357)
2025-06-23 09:29:53 +00:00
mob-sakai cadbb8d68d fix: support world canvas without UI events
close #356, close #357
2025-06-23 18:15:58 +09:00
mob-sakai a0c3e4997a fix: add GetGradientKeys and GetTransitionGradientKeys APIs
close #358
2025-06-23 18:15:08 +09:00
semantic-release-bot ec57c2a994 chore(release): 5.9.2 [skip ci]
## [5.9.2](https://github.com/mob-sakai/UIEffect/compare/5.9.1...5.9.2) (2025-06-12)

### Bug Fixes

* TextMeshPro 3.2.0-pre support ([804b48c](https://github.com/mob-sakai/UIEffect/commit/804b48c73ec648eaceb720cb79551fdbf3729fc9)), closes [#355](https://github.com/mob-sakai/UIEffect/issues/355)
2025-06-12 11:51:05 +00:00
mob-sakai 804b48c73e fix: TextMeshPro 3.2.0-pre support
close #355
2025-06-12 20:49:32 +09:00
semantic-release-bot 01be18bb28 chore(release): 5.9.1 [skip ci]
## [5.9.1](https://github.com/mob-sakai/UIEffect/compare/5.9.0...5.9.1) (2025-06-11)

### Bug Fixes

* prefabs will be deselected when editing them ([8addbad](https://github.com/mob-sakai/UIEffect/commit/8addbad4941340807d824e295280473d197d889f)), closes [#354](https://github.com/mob-sakai/UIEffect/issues/354)
2025-06-11 09:15:00 +00:00
mob-sakai 8addbad494 fix: prefabs will be deselected when editing them
close #354
2025-06-11 18:11:58 +09:00
mob-sakai dc5b3805d7 docs: update readme 2025-06-09 20:12:33 +09:00
semantic-release-bot bbb5ae0f3e chore(release): 5.9.0 [skip ci]
# [5.9.0](https://github.com/mob-sakai/UIEffect/compare/5.8.7...5.9.0) (2025-06-09)

### Bug Fixes

* `GradationMode.RadialFast` and `GradationMode.RadialDetail` are obsolete ([1a923dd](https://github.com/mob-sakai/UIEffect/commit/1a923dd72c263de5480d71bd17b697feca317ef1))
* soft masking not working with `DetailFilter.Masking` ([ffdeaa7](https://github.com/mob-sakai/UIEffect/commit/ffdeaa7e2f1c2a9ccb7eb21d5674e2c19021aef9))

### Features

* `GradationGradient` supports HDR color ([50f6b3c](https://github.com/mob-sakai/UIEffect/commit/50f6b3c5d20b93a2245f6d54b6eb4bc13565c3b5))
* add `Clear` method to reset properties via script ([264c453](https://github.com/mob-sakai/UIEffect/commit/264c453bb6ebad08ef950b0cec2f38e60a1710d8)), closes [#337](https://github.com/mob-sakai/UIEffect/issues/337)
* add `GradationMode.RadialGradient` feature ([179ec89](https://github.com/mob-sakai/UIEffect/commit/179ec89a0215af9d8046e150d98fa06371155e93)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationReverse` option for gradient ([c0fec32](https://github.com/mob-sakai/UIEffect/commit/c0fec32d502ec1f9d03172ed200f4d9233506eb9)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationWrapMode` option ([f98929d](https://github.com/mob-sakai/UIEffect/commit/f98929d7e9656b4c02d5545b3893748c963d1118))
* add `TransitionFilter.Blaze` feature ([ed4716d](https://github.com/mob-sakai/UIEffect/commit/ed4716d7ada102fe0053480941925e9f27b1c2c3))
* add new built-in presets ([4f2c9f1](https://github.com/mob-sakai/UIEffect/commit/4f2c9f12b5e115bab1418a7a0b1187269a041fc4))
* improve performance for TextMeshPro ([6af520e](https://github.com/mob-sakai/UIEffect/commit/6af520ed408f2e5eb4d84ec0df484338719ebc8e))
* timeline package support ([742a5cd](https://github.com/mob-sakai/UIEffect/commit/742a5cd8dc47500de4b111a132d7a8b242844342)), closes [#347](https://github.com/mob-sakai/UIEffect/issues/347)
* update shaders in samples ([4c6cd11](https://github.com/mob-sakai/UIEffect/commit/4c6cd11d86582f2351c40374180828ad1c8955c3))
2025-06-09 09:36:30 +00:00
mob-sakai ffdeaa7e2f fix: soft masking not working with DetailFilter.Masking 2025-06-09 18:35:23 +09:00
mob-sakai f879424b3f chore: update samples 2025-06-09 18:35:23 +09:00
mob-sakai effdd6d06e chore: update dev proj 2025-06-09 18:35:23 +09:00
mob-sakai b39ba58a85 docs: update readme 2025-06-09 18:35:23 +09:00
mob-sakai 742a5cd8dc feat: timeline package support
Tracks for changing properties have been added. Also, `ControlTrack` enables `UIEffect` only within the clip.

close #347
2025-06-09 18:13:20 +09:00
mob-sakai 1a923dd72c fix: GradationMode.RadialFast and GradationMode.RadialDetail are obsolete
Use `GradationMode.Radial` instead.
2025-06-09 18:11:34 +09:00
mob-sakai c0fec32d50 feat: add GradationReverse option for gradient
close #348
2025-06-09 18:11:33 +09:00
mob-sakai 4f2c9f12b5 feat: add new built-in presets 2025-06-09 17:11:08 +09:00
mob-sakai 264c453bb6 feat: add Clear method to reset properties via script
close #337
2025-06-09 17:11:08 +09:00
mob-sakai 4c6cd11d86 feat: update shaders in samples
NOTE: Imported samples will be automatically updated.
2025-06-09 17:11:08 +09:00
mob-sakai 50f6b3c5d2 feat: GradationGradient supports HDR color 2025-06-09 17:11:08 +09:00
mob-sakai f98929d7e9 feat: add GradationWrapMode option 2025-06-09 17:11:08 +09:00
mob-sakai 179ec89a02 feat: add GradationMode.RadialGradient feature
close #348
2025-06-09 17:11:08 +09:00
mob-sakai ed4716d7ad feat: add TransitionFilter.Blaze feature 2025-06-09 17:11:08 +09:00
mob-sakai 6af520ed40 feat: improve performance for TextMeshPro 2025-06-09 17:11:08 +09:00
semantic-release-bot 9b1af29cd4 chore(release): 5.8.7 [skip ci]
## [5.8.7](https://github.com/mob-sakai/UIEffect/compare/5.8.6...5.8.7) (2025-06-09)

### Bug Fixes

* `GradationGradient` and `TransitionGradient` in reprica will be not dirty (editor) ([58b197e](https://github.com/mob-sakai/UIEffect/commit/58b197e551aea8efca10e12da8df132853d4a24e))
* changes not reflected in rendering when TextMeshPro is cleared ([f508eb3](https://github.com/mob-sakai/UIEffect/commit/f508eb32caf6757eb4c27b98ac29a1582dcd14b4)), closes [#351](https://github.com/mob-sakai/UIEffect/issues/351)
* setting `gradationScale` to 0 throws `DivideByZeroException` ([ecd265e](https://github.com/mob-sakai/UIEffect/commit/ecd265e4828c7f81c96a76c16df147b6c4804429))
2025-06-09 08:10:01 +00:00
mob-sakai 65a00b480f chore: update test workflow 2025-06-09 16:16:31 +09:00
mob-sakai f508eb32ca fix: changes not reflected in rendering when TextMeshPro is cleared
close #351
2025-06-09 16:16:30 +09:00
mob-sakai ecd265e482 fix: setting gradationScale to 0 throws DivideByZeroException 2025-06-09 16:16:30 +09:00
mob-sakai 58b197e551 fix: GradationGradient and TransitionGradient in reprica will be not dirty (editor) 2025-06-09 16:14:30 +09:00
semantic-release-bot 8a0e7d6b26 chore(release): 5.8.6 [skip ci]
## [5.8.6](https://github.com/mob-sakai/UIEffect/compare/5.8.5...5.8.6) (2025-05-22)

### Bug Fixes

* some methods may be called multiple times when domain reload on play is disabled (editor) ([3b52c3a](https://github.com/mob-sakai/UIEffect/commit/3b52c3a8fc67980d426b8e4e2ed2067c725ca262))
2025-05-22 12:09:00 +00:00
mob-sakai 3b52c3a8fc fix: some methods may be called multiple times when domain reload on play is disabled (editor) 2025-05-22 21:08:27 +09:00
semantic-release-bot 88261e2af0 chore(release): 5.8.5 [skip ci]
## [5.8.5](https://github.com/mob-sakai/UIEffect/compare/5.8.4...5.8.5) (2025-05-22)

### Bug Fixes

* skip processing when graphic is invalid ([5cd48a4](https://github.com/mob-sakai/UIEffect/commit/5cd48a463309270ec3d6501bde2add9944bbaf02))
* TextMeshPro strikethrough and underline not displaying ([68ebae2](https://github.com/mob-sakai/UIEffect/commit/68ebae28e02045cb45996bf5b77d7d93d2f0ca82)), closes [#344](https://github.com/mob-sakai/UIEffect/issues/344)
* TMP SubMeshUI generates overhead every frame (since 5.6.0) ([791d867](https://github.com/mob-sakai/UIEffect/commit/791d8670761902466d81412d832cddf013cd28cd)), closes [#343](https://github.com/mob-sakai/UIEffect/issues/343) [#345](https://github.com/mob-sakai/UIEffect/issues/345)
2025-05-22 11:14:57 +00:00
mob-sakai 791d867076 fix: TMP SubMeshUI generates overhead every frame (since 5.6.0)
close #343, close #345
2025-05-22 19:48:34 +09:00
mob-sakai 68ebae28e0 fix: TextMeshPro strikethrough and underline not displaying
close #344
2025-05-22 19:48:34 +09:00
mob-sakai 5cd48a4633 fix: skip processing when graphic is invalid 2025-05-22 19:48:34 +09:00
semantic-release-bot 3ff52e4735 chore(release): 5.8.4 [skip ci]
## [5.8.4](https://github.com/mob-sakai/UIEffect/compare/5.8.3...5.8.4) (2025-04-30)

### Bug Fixes

* NRE while canvas is disabled ([a3773e3](https://github.com/mob-sakai/UIEffect/commit/a3773e33028c60517fb4e6c534f6280194df8e64)), closes [#342](https://github.com/mob-sakai/UIEffect/issues/342)
2025-04-30 22:53:37 +00:00
mob-sakai a3773e3302 fix: NRE while canvas is disabled
close #342
2025-05-01 07:53:04 +09:00
259 changed files with 18621 additions and 11831 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
find _site -name __MACOSX | xargs rm -rf
- name: 📦 Upload '_site'
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
- name: 🚀 Deploy To GitHub Pages
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
+3 -3
View File
@@ -25,10 +25,10 @@ jobs:
tag: ${{ steps.release.outputs.new_release_git_tag }}
steps:
- name: 🚚 Checkout (${{ github.ref_name }})
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: 🔖 Run semantic release
uses: cycjimmy/semantic-release-action@v4
uses: cycjimmy/semantic-release-action@v6
id: release
with:
working_directory: Packages/src
@@ -36,7 +36,7 @@ jobs:
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
- run: |
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
+40 -40
View File
@@ -9,7 +9,7 @@ env:
# MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 6000.0
# EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
EXCLUDE_FILTER: "(2017|2018|2023.3)"
PROJECT_PATH: UIEffectURP
on:
@@ -27,7 +27,7 @@ on:
- "!*"
paths-ignore:
- "**.md"
pull_request_target:
pull_request:
types:
- opened
- reopened
@@ -39,16 +39,30 @@ jobs:
setup:
name: ⚙️ Setup
runs-on: ubuntu-latest
permissions: {} # No permissions needed for setup job
outputs:
unityVersions: ${{ steps.setup.outputs.unityVersions }}
steps:
- name: 🔑 Secrets check
run: |
echo "Checking secrets for ${{ github.actor }} ..."
if [ -z "$UNITY_EMAIL" ] || [ -z "$UNITY_PASSWORD" ] || [ -z "$UNITY_LICENSE" ]; then
echo "Error: UNITY_EMAIL, UNITY_PASSWORD, and UNITY_LICENSE secrets must be set." | tee -a $GITHUB_STEP_SUMMARY >&2
echo "Error: See https://game.ci/docs/github/test-runner#basic-setup" | tee -a $GITHUB_STEP_SUMMARY >&2
echo "Error: Set the secrets at ${{ github.server_url }}/${{ github.repository }}/settings/secrets/actions" | tee -a $GITHUB_STEP_SUMMARY >&2
exit 1
fi
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- name: ⚙️ Find target Unity versions
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch --min ${MINIMUM_VERSION}`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions --min ${MINIMUM_VERSION} --grep '0f'`
else
ADDITIONAL_VERSIONS=[]
fi
@@ -66,39 +80,24 @@ jobs:
needs: setup
strategy:
fail-fast: false
max-parallel: 6
max-parallel: 8
matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps:
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 🚚 Marge pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
uses: actions/checkout@v7
- name: 📥 Cache library
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ env.PROJECT_PATH }}/Library
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-
${{ env.PROJECT_PATH }}-Library-
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
uses: mob-sakai/unity-builder@fix/support-unity6.6
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
@@ -111,16 +110,17 @@ jobs:
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# - name: 🧪 Run tests
# uses: game-ci/unity-test-runner@v4
# timeout-minutes: 45
# with:
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# # unityVersion: ${{ matrix.unityVersion }}
# customParameters: -nographics
# checkName: ${{ matrix.unityVersion }} Test Results
# githubToken: ${{ github.token }}
# env:
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# - name: 🧪 Run tests
# uses: mob-sakai/unity-test-runner@fix/support-unity6.6
# timeout-minutes: 45
# with:
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# # unityVersion: ${{ matrix.unityVersion }}
# customParameters: -nographics
# checkName: ${{ matrix.unityVersion }} Test Results
# githubToken: ${{ github.token }}
# projectPath: ${{ env.PROJECT_PATH }}
# env:
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
+27 -28
View File
@@ -9,7 +9,7 @@ env:
# MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 2020.3
# EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
EXCLUDE_FILTER: "(2017|2018|2023.3)"
PROJECT_PATH: .
on:
@@ -27,7 +27,7 @@ on:
- "!*"
paths-ignore:
- "**.md"
pull_request_target:
pull_request:
types:
- opened
- reopened
@@ -39,16 +39,30 @@ jobs:
setup:
name: ⚙️ Setup
runs-on: ubuntu-latest
permissions: {} # No permissions needed for setup job
outputs:
unityVersions: ${{ steps.setup.outputs.unityVersions }}
steps:
- name: 🔑 Secrets check
run: |
echo "Checking secrets for ${{ github.actor }} ..."
if [ -z "$UNITY_EMAIL" ] || [ -z "$UNITY_PASSWORD" ] || [ -z "$UNITY_LICENSE" ]; then
echo "Error: UNITY_EMAIL, UNITY_PASSWORD, and UNITY_LICENSE secrets must be set." | tee -a $GITHUB_STEP_SUMMARY >&2
echo "Error: See https://game.ci/docs/github/test-runner#basic-setup" | tee -a $GITHUB_STEP_SUMMARY >&2
echo "Error: Set the secrets at ${{ github.server_url }}/${{ github.repository }}/settings/secrets/actions" | tee -a $GITHUB_STEP_SUMMARY >&2
exit 1
fi
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- name: ⚙️ Find target Unity versions
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
LATEST_VERSIONS=`npx -y unity-changeset@latest list --json --versions --all --latest-patch --min ${MINIMUM_VERSION}`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
ADDITIONAL_VERSIONS=`npx -y unity-changeset@latest list --json --versions --min ${MINIMUM_VERSION} --grep '0f'`
else
ADDITIONAL_VERSIONS=[]
fi
@@ -66,39 +80,24 @@ jobs:
needs: setup
strategy:
fail-fast: false
max-parallel: 6
max-parallel: 8
matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps:
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 🚚 Marge pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
uses: actions/checkout@v7
- name: 📥 Cache library
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ env.PROJECT_PATH }}/Library
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-
${{ env.PROJECT_PATH }}-Library-
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
uses: mob-sakai/unity-builder@fix/support-unity6.6
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
@@ -112,7 +111,7 @@ jobs:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- name: 🧪 Run tests
uses: game-ci/unity-test-runner@v4
uses: mob-sakai/unity-test-runner@fix/support-unity6.6
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 809b2c417b0714d479b9ccf131d24bda
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,106 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
m_Name: AddressableAssetSettings
m_EditorClassIdentifier:
m_DefaultGroup: 78c1e50bdf28744fc9af8aedb47f2517
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
m_CatalogRequestsTimeout: 0
m_DisableCatalogUpdateOnStart: 0
m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_NonRecursiveBuilding: 0
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 3
m_ContiguousBundles: 0
m_StripUnityVersionFromBundleBuild: 0
m_DisableVisibleSubAssetRepresentations: 0
m_ShaderBundleNaming: 0
m_ShaderBundleCustomNaming:
m_MonoScriptBundleNaming: 0
m_CheckForContentUpdateRestrictionsOption: 0
m_MonoScriptBundleCustomNaming:
m_RemoteCatalogBuildPath:
m_Id: e92f87e9fe51b4b0b8a9a47cf7cab399
m_RemoteCatalogLoadPath:
m_Id: f077767d1bbbf451db919d7819556f80
m_ContentStateBuildPathProfileVariableName: <default settings path>
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 0
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
m_GroupAssets:
- {fileID: 11400000, guid: d990055319c2b44b0b81ce4e3045db49, type: 2}
- {fileID: 11400000, guid: cb582cfe3736847f09b83adf8d15c36a, type: 2}
m_BuildSettings:
m_CompileScriptsInVirtualMode: 0
m_CleanupStreamingAssetsAfterBuilds: 1
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: f0c1919924e394e59af6bca6c9c911f0
m_ProfileName: Default
m_Values:
- m_Id: 45c7a530ddf2f4d138f32bf67335f91b
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_Id: c903326cd5c18420c8e3c894b1648d26
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: d01b18903c32d4541ac46fd27aeee619
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: e92f87e9fe51b4b0b8a9a47cf7cab399
m_Value: ServerData/[BuildTarget]
- m_Id: f077767d1bbbf451db919d7819556f80
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
m_ProfileEntryNames:
- m_Id: 45c7a530ddf2f4d138f32bf67335f91b
m_Name: Local.LoadPath
m_InlineUsage: 0
- m_Id: c903326cd5c18420c8e3c894b1648d26
m_Name: Local.BuildPath
m_InlineUsage: 0
- m_Id: d01b18903c32d4541ac46fd27aeee619
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: e92f87e9fe51b4b0b8a9a47cf7cab399
m_Name: Remote.BuildPath
m_InlineUsage: 0
- m_Id: f077767d1bbbf451db919d7819556f80
m_Name: Remote.LoadPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: e03fdb26845f04c75b6fe9288c63a63a, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 3
m_DataBuilders:
- {fileID: 11400000, guid: 797c488c7f2114197a8f18811c5cd128, type: 2}
- {fileID: 11400000, guid: 1400420db15a741b5a71c357c678c805, type: 2}
- {fileID: 11400000, guid: 96f4fd6856bbb4d5998503b7b5d15151, type: 2}
- {fileID: 11400000, guid: afc7e8697497b41f2ac9064294b360eb, type: 2}
m_ActiveProfileId: f0c1919924e394e59af6bca6c9c911f0
m_HostingServicesManager:
m_HostingServiceInfos: []
m_Settings: {fileID: 11400000}
m_NextInstanceId: 0
m_RegisteredServiceTypeRefs: []
m_PingTimeoutInMilliseconds: 5000
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 43329c4cc56ca415da37a048e434183a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a0cd82815cf624171bd2e59cf74c4f7d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,76 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6130888278409392347
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id:
m_LoadPath:
m_Id:
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_BundleNaming: 0
m_AssetLoadMode: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
m_Name: Packed Assets
m_EditorClassIdentifier:
m_SchemaObjects:
- {fileID: -6130888278409392347}
- {fileID: 5814898001239217010}
m_Description: Pack assets into asset bundles.
m_Settings: {fileID: 11400000, guid: 43329c4cc56ca415da37a048e434183a, type: 2}
--- !u!114 &5814898001239217010
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e03fdb26845f04c75b6fe9288c63a63a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 022ed075843094601944a986a7c4ea61
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,34 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Built In Data
m_EditorClassIdentifier:
m_GroupName: Built In Data
m_Data:
m_SerializedData: []
m_GUID: 05078fdb0a88640219afbdb7f385d64e
m_SerializeEntries:
- m_GUID: EditorSceneList
m_Address: EditorSceneList
m_ReadOnly: 1
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: Resources
m_Address: Resources
m_ReadOnly: 1
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 43329c4cc56ca415da37a048e434183a, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: b05efeaac5be043d1b4b6fd1077db150, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d990055319c2b44b0b81ce4e3045db49
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Default Local Group
m_EditorClassIdentifier:
m_GroupName: Default Local Group
m_Data:
m_SerializedData: []
m_GUID: 78c1e50bdf28744fc9af8aedb47f2517
m_SerializeEntries:
- m_GUID: d9f8e387c42cf4a6785eb5cf2a94beae
m_Address: Assets/ProjectSettings/UIEffectProjectSettings.asset
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 43329c4cc56ca415da37a048e434183a, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 1357ca7896c984ca2bec3ee274fc2b16, type: 2}
- {fileID: 11400000, guid: 2796025dd70994899bc32992cf7024c9, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb582cfe3736847f09b83adf8d15c36a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6f4bdfbde85c84294892ee4118bf99c8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1487f5d688e4f94f828f879d599dbdc, type: 3}
m_Name: Built In Data_PlayerDataGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: d990055319c2b44b0b81ce4e3045db49, type: 2}
m_IncludeResourcesFolders: 1
m_IncludeBuildSettingsScenes: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b05efeaac5be043d1b4b6fd1077db150
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,45 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Default Local Group_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: cb582cfe3736847f09b83adf8d15c36a, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: c903326cd5c18420c8e3c894b1648d26
m_LoadPath:
m_Id: 45c7a530ddf2f4d138f32bf67335f91b
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 0
m_AssetLoadMode: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1357ca7896c984ca2bec3ee274fc2b16
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Default Local Group_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: cb582cfe3736847f09b83adf8d15c36a, type: 2}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2796025dd70994899bc32992cf7024c9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c26ed2464c14469b95f5e97b5f2428c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88d21199f5d473f4db36845f2318f180, type: 3}
m_Name: BuildScriptFastMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 797c488c7f2114197a8f18811c5cd128
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
m_Name: BuildScriptPackedMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: afc7e8697497b41f2ac9064294b360eb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
m_Name: BuildScriptPackedPlayMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 96f4fd6856bbb4d5998503b7b5d15151
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bb0e4994b34add1409fd8ccaf4a82de5, type: 3}
m_Name: BuildScriptVirtualMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1400420db15a741b5a71c357c678c805
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
m_Name: DefaultObject
m_EditorClassIdentifier:
m_AddressableAssetSettingsGuid: 43329c4cc56ca415da37a048e434183a
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c73d220faf28240f1a28d59807c79b75
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6d68f022c46564bf6ac355588397507a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 96c707d74b3d841a5a3015029fa74330
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,34 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7e3976da977cb49238499ea3b4c237ae, type: 3}
m_Name: ProfileDataSourceSettings
m_EditorClassIdentifier:
profileGroupTypes:
- m_GroupTypePrefix: Built-In
m_Variables:
- m_Suffix: BuildPath
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Suffix: LoadPath
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_GroupTypePrefix: Editor Hosted
m_Variables:
- m_Suffix: BuildPath
m_Value: ServerData/[BuildTarget]
- m_Suffix: LoadPath
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
environments: []
currentEnvironment:
id:
projectId:
projectGenesisId:
name:
isDefault: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4ecf31fe7c4aa4565ad61fab272f22b8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 481f0900af5824be89c275390a9fa0b4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+104
View File
@@ -0,0 +1,104 @@
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class HotUpdate : MonoBehaviour
{
[SerializeField]
private string m_Address;
[SerializeField]
private Text m_Log;
[SerializeField]
private bool m_ExecuteOnStart;
private readonly StringBuilder _sb = new StringBuilder(1024);
private Coroutine _co;
private void Start()
{
if (m_ExecuteOnStart)
{
Execute();
}
}
private void AddLog(string message)
{
Debug.Log(message);
_sb.AppendLine(message);
if (m_Log)
{
m_Log.text = _sb.ToString();
}
}
public void Execute()
{
if (string.IsNullOrEmpty(m_Address))
{
AddLog($"*** Address is empty. Please set the address of the asset to load.");
return;
}
if (_co != null)
{
AddLog($"*** Execution is already in progress. Please wait until it completes.");
return;
}
_co = StartCoroutine(Co_Execute());
}
public void LoadNextScene()
{
SceneManager.LoadScene(gameObject.scene.buildIndex + 1, LoadSceneMode.Single);
}
private IEnumerator Co_Execute()
{
AddLog($"########################################");
AddLog($"Hot update starting...");
AddLog($"########################################");
AddLog("");
AddLog($"Loading '{m_Address}'...");
var handle = Addressables.LoadAssetAsync<Object>(m_Address);
while (handle.IsDone == false)
{
yield return new WaitForSeconds(0.1f);
AddLog($" Progress: {handle.PercentComplete:P}");
}
if (handle.Status == AsyncOperationStatus.Succeeded)
{
AddLog($" Loaded '{m_Address}' successfully.");
}
else
{
AddLog($" *** Failed to load '{m_Address}'.");
AddLog($" *** {handle.OperationException.Message}");
yield break;
}
AddLog("");
AddLog($"Hot-Update complete !");
AddLog("");
AddLog($" -> Load next scene in: 3");
yield return new WaitForSeconds(1f);
AddLog($" -> Load next scene in: 2");
yield return new WaitForSeconds(1f);
AddLog($" -> Load next scene in: 1");
yield return new WaitForSeconds(1f);
LoadNextScene();
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7f0dee01a862040a58ac6b6057944cd3
guid: 0fd13d911290d4262ad39fa2c45e030c
MonoImporter:
externalObjects: {}
serializedVersion: 2
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7ec916ecedc5e41a1896062381cbd257
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -31,6 +31,8 @@ ShaderVariantCollection:
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BLAZE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BURN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_DISSOLVE UNDERLAY_ON
@@ -41,6 +43,46 @@ ShaderVariantCollection:
passType: 0
- keywords: GLOW_ON TRANSITION_SHINY UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: COLOR_FILTER GLOW_ON UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO
passType: 0
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
passType: 0
- keywords: TRANSITION_DISSOLVE
passType: 0
- keywords: GLOW_ON TRANSITION_DISSOLVE UNDERLAY_ON
passType: 0
- keywords: TRANSITION_SHINY
passType: 0
- keywords: GLOW_ON TRANSITION_SHINY UNDERLAY_ON
passType: 0
- keywords: TRANSITION_MELT
passType: 0
- keywords: GLOW_ON TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: TRANSITION_BURN
passType: 0
- keywords: GLOW_ON TRANSITION_BURN UNDERLAY_ON
passType: 0
- keywords: COLOR_FILTER GLOW_ON TRANSITION_BURN UNDERLAY_ON
passType: 0
- keywords: TRANSITION_PATTERN
passType: 0
- keywords: GLOW_ON TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: EDGE_PLAIN GLOW_ON UNDERLAY_ON
passType: 0
- keywords: COLOR_FILTER GLOW_ON GRADATION_GRADIENT UNDERLAY_ON
passType: 0
- first: {fileID: 4800000, guid: 96246b1ead49a4c5a996fd477bc5a117, type: 3}
second:
variants:
@@ -72,6 +114,8 @@ ShaderVariantCollection:
passType: 0
- keywords: DETAIL_MULTIPLY
passType: 0
- keywords: DETAIL_MULTIPLY GRADATION_GRADIENT
passType: 0
- keywords: DETAIL_MULTIPLY_ADDITIVE
passType: 0
- keywords: DETAIL_REPLACE
@@ -126,6 +170,10 @@ ShaderVariantCollection:
passType: 0
- keywords: TONE_SEPIA
passType: 0
- keywords: TRANSITION_BLAZE
passType: 0
- keywords: TRANSITION_BLAZE UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_BURN
passType: 0
- keywords: TRANSITION_BURN UNITY_UI_CLIP_RECT
@@ -152,6 +200,114 @@ ShaderVariantCollection:
passType: 0
- keywords: TRANSITION_SHINY UNITY_UI_CLIP_RECT
passType: 0
- keywords: TONE_GRAYSCALE
passType: 0
- keywords: TONE_SEPIA
passType: 0
- keywords: TONE_NEGATIVE
passType: 0
- keywords: TONE_RETRO
passType: 0
- keywords: TONE_POSTERIZE
passType: 0
- keywords: COLOR_FILTER
passType: 0
- keywords: SAMPLING_BLUR_FAST
passType: 0
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST
passType: 0
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST UNITY_UI_CLIP_RECT
passType: 0
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST TONE_GRAYSCALE
passType: 0
- keywords: SAMPLING_BLUR_MEDIUM
passType: 0
- keywords: SAMPLING_BLUR_DETAIL
passType: 0
- keywords: SAMPLING_PIXELATION
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO UNITY_UI_CLIP_RECT
passType: 0
- keywords: SAMPLING_RGB_SHIFT
passType: 0
- keywords: SAMPLING_EDGE_LUMINANCE
passType: 0
- keywords: SAMPLING_EDGE_ALPHA
passType: 0
- keywords: TRANSITION_FADE
passType: 0
- keywords: TRANSITION_CUTOFF
passType: 0
- keywords: TRANSITION_DISSOLVE
passType: 0
- keywords: TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
passType: 0
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_DISSOLVE
passType: 0
- keywords: TRANSITION_SHINY
passType: 0
- keywords: TRANSITION_SHINY UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_MASK
passType: 0
- keywords: SAMPLING_EDGE_LUMINANCE TRANSITION_MASK
passType: 0
- keywords: TRANSITION_MELT
passType: 0
- keywords: TRANSITION_MELT UNITY_UI_CLIP_RECT
passType: 0
- keywords: COLOR_FILTER TRANSITION_MELT
passType: 0
- keywords: TRANSITION_BURN
passType: 0
- keywords: TRANSITION_BURN UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_PATTERN
passType: 0
- keywords: TRANSITION_PATTERN UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_BLAZE
passType: 0
- keywords: EDGE_PLAIN
passType: 0
- keywords: COLOR_FILTER EDGE_PLAIN
passType: 0
- keywords: EDGE_PLAIN TRANSITION_PATTERN
passType: 0
- keywords: COLOR_FILTER EDGE_PLAIN TRANSITION_PATTERN
passType: 0
- keywords: EDGE_SHINY
passType: 0
- keywords: COLOR_FILTER EDGE_SHINY
passType: 0
- keywords: EDGE_SHINY SAMPLING_EDGE_ALPHA
passType: 0
- keywords: EDGE_SHINY TRANSITION_PATTERN
passType: 0
- keywords: DETAIL_MASKING
passType: 0
- keywords: DETAIL_MULTIPLY
passType: 0
- keywords: DETAIL_ADDITIVE
passType: 0
- keywords: DETAIL_SUBTRACTIVE
passType: 0
- keywords: DETAIL_REPLACE
passType: 0
- keywords: DETAIL_MULTIPLY_ADDITIVE
passType: 0
- keywords: COLOR_FILTER TARGET_HUE
passType: 0
- keywords: COLOR_FILTER TARGET_LUMINANCE
passType: 0
- keywords: GRADATION_GRADIENT
passType: 0
- keywords: GRADATION_COLOR2
passType: 0
- keywords: GRADATION_COLOR4
passType: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -164,6 +320,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7d43f626d9b5f4d729097092ded48bdb, type: 3}
m_Name: UIEffectProjectSettings
m_EditorClassIdentifier:
m_PreLoadSettingsInBuild: 0
m_RuntimePresets: []
m_RuntimePresetsV2:
- {fileID: 11400000, guid: 460881a8263ce454799a8c689c28d8c9, type: 2}
@@ -191,5 +348,8 @@ MonoBehaviour:
- key: Hidden/UI/Default (SoftMaskable)
value: Hidden/UI/Default (UIEffect)
m_Asset: {fileID: -8740588384831342173}
m_RegisteredShaders:
- {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
- {fileID: 4800000, guid: 96246b1ead49a4c5a996fd477bc5a117, type: 3}
m_ErrorOnUnregisteredVariant: 0
m_UnregisteredVariants: []
+2 -1
View File
@@ -4,7 +4,8 @@
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
"com.unity.ide.rider": "3.0.36",
"com.unity.addressables": "1.22.3",
"com.unity.ide.rider": "3.0.38",
"com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.9",
"com.unity.modules.animation": "1.0.0"
+49 -1
View File
@@ -38,6 +38,20 @@
"com.unity.ugui": "1.0.0"
}
},
"com.unity.addressables": {
"version": "1.22.3",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.scriptablebuildpipeline": "1.21.25",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.6",
"depth": 1,
@@ -46,7 +60,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.36",
"version": "3.0.38",
"depth": 0,
"source": "registry",
"dependencies": {
@@ -54,6 +68,13 @@
},
"url": "https://packages.unity.com"
},
"com.unity.scriptablebuildpipeline": {
"version": "1.21.25",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.33",
"depth": 0,
@@ -89,6 +110,18 @@
"source": "builtin",
"dependencies": {}
},
"com.unity.modules.assetbundle": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {}
},
"com.unity.modules.imageconversion": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {}
},
"com.unity.modules.imgui": {
"version": "1.0.0",
"depth": 1,
@@ -106,6 +139,21 @@
"depth": 2,
"source": "builtin",
"dependencies": {}
},
"com.unity.modules.unitywebrequest": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {}
},
"com.unity.modules.unitywebrequestassetbundle": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0"
}
}
}
}
+261
View File
@@ -1,3 +1,264 @@
## [5.11.8](https://github.com/mob-sakai/UIEffect/compare/5.11.7...5.11.8) (2026-11-06)
### Bug Fixes
* remove conflicting FormerlySerializedAs on UIEffectTweener.m_PlayOnEnable ([55a7f27](https://github.com/mob-sakai/UIEffect/commit/55a7f272042e869e6659f7a2603f9a16dbb3ab65))
## [5.11.7](https://github.com/mob-sakai/UIEffect/compare/5.11.6...5.11.7) (2026-08-27)
### Bug Fixes
* ignore shader registry order changes ([014bba3](https://github.com/mob-sakai/UIEffect/commit/014bba3f5687ecfe41caa00d454f196baf7e3483)), closes [#407](https://github.com/mob-sakai/UIEffect/issues/407)
## [5.11.6](https://github.com/mob-sakai/UIEffect/compare/5.11.5...5.11.6) (2026-08-17)
### Bug Fixes
* refresh material when changing shadow mode ([8bb782c](https://github.com/mob-sakai/UIEffect/commit/8bb782c90afb42d6569d8dfcfe022b007171f97e))
## [5.11.5](https://github.com/mob-sakai/UIEffect/compare/5.11.4...5.11.5) (2026-07-23)
### Bug Fixes
* fix memory leak ([2dcb7f7](https://github.com/mob-sakai/UIEffect/commit/2dcb7f7e8678a2ffcf3832d0c5011aa1da6c3677)), closes [#405](https://github.com/mob-sakai/UIEffect/issues/405)
## [5.11.4](https://github.com/mob-sakai/UIEffect/compare/5.11.3...5.11.4) (2026-07-22)
### Bug Fixes
* infinite asset import loop caused by unchanged ProjectSettings being marked dirty ([dbf8ae0](https://github.com/mob-sakai/UIEffect/commit/dbf8ae00f50470912d458fda853a34ef94d7d533)), closes [#404](https://github.com/mob-sakai/UIEffect/issues/404)
## [5.11.3](https://github.com/mob-sakai/UIEffect/compare/5.11.2...5.11.3) (2026-07-04)
### Bug Fixes
* TextMeshPro support is not working ([9d98096](https://github.com/mob-sakai/UIEffect/commit/9d980961d6cf45e519ad96bf2e7260ed515f0f70)), closes [#402](https://github.com/mob-sakai/UIEffect/issues/402)
## [5.11.2](https://github.com/mob-sakai/UIEffect/compare/5.11.1...5.11.2) (2026-07-02)
### Bug Fixes
* add null check ([161fc54](https://github.com/mob-sakai/UIEffect/commit/161fc546cad251ad798c2fd9e9472d687aa7f2c3))
## [5.11.1](https://github.com/mob-sakai/UIEffect/compare/5.11.0...5.11.1) (2026-06-29)
### Bug Fixes
* support "disable domain reload" on Unity 6.6 or later ([a556c28](https://github.com/mob-sakai/UIEffect/commit/a556c282210303d9e7a7c284bb4b41ef3a35e3e1))
# [5.11.0](https://github.com/mob-sakai/UIEffect/compare/5.10.9...5.11.0) (2026-06-25)
### Bug Fixes
* enable/disable Gameobject break effect with 'TrueShadow' ([730aa2b](https://github.com/mob-sakai/UIEffect/commit/730aa2bb4d872ddab63f2dad611a063cefa07064)), closes [#400](https://github.com/mob-sakai/UIEffect/issues/400)
* select TMP submesh by mesh before material ([f538ef2](https://github.com/mob-sakai/UIEffect/commit/f538ef2cba3d4d76f6683bccee65d5a9694dad37))
* some fix ([b6b538f](https://github.com/mob-sakai/UIEffect/commit/b6b538f64f0b06ddfb4ad2edd6b7db6dc1d067d8))
* Support for skipping "reload domain" ([ec3fb13](https://github.com/mob-sakai/UIEffect/commit/ec3fb13c111638781bf852e2a4a4747fbfeb7d3a))
### Features
* add option to remove from preloadedAssets when build player ([e955715](https://github.com/mob-sakai/UIEffect/commit/e955715c99c474881e0b27ecc325061ce0d866a0)), closes [#393](https://github.com/mob-sakai/UIEffect/issues/393)
* support XBOX One/Series ([72bb1c5](https://github.com/mob-sakai/UIEffect/commit/72bb1c51318829e7ced3b1436892a5969aedd9a3)), closes [#385](https://github.com/mob-sakai/UIEffect/issues/385) [#394](https://github.com/mob-sakai/UIEffect/issues/394)
## [5.10.9](https://github.com/mob-sakai/UIEffect/compare/5.10.8...5.10.9) (2026-06-08)
### Bug Fixes
* ambiguous call to 'lerp' in shader ([cd68b36](https://github.com/mob-sakai/UIEffect/commit/cd68b364c48e979d6ef227e53a522f096e0df47a)), closes [#390](https://github.com/mob-sakai/UIEffect/issues/390)
* Clarify that the `ShaderGraph support` is available only in Unity 2023.2/6.0 or later ([57031c3](https://github.com/mob-sakai/UIEffect/commit/57031c3e3c2d64ee76d3e568d378cd54a5e84af5)), closes [#391](https://github.com/mob-sakai/UIEffect/issues/391)
* support Unity 6.5 or later ([2d6f7ed](https://github.com/mob-sakai/UIEffect/commit/2d6f7ed63dd83b3f90c2fa6d93a3c84afd6de866)), closes [#392](https://github.com/mob-sakai/UIEffect/issues/392) [#398](https://github.com/mob-sakai/UIEffect/issues/398)
* UIEffect.detailColor is not working ([f3da972](https://github.com/mob-sakai/UIEffect/commit/f3da972c0cba526f7784207c2d8ab48b5dd692f3)), closes [#399](https://github.com/mob-sakai/UIEffect/issues/399)
## [5.10.8](https://github.com/mob-sakai/UIEffect/compare/5.10.7...5.10.8) (2026-01-16)
### Bug Fixes
* Canvas not properly cached when objects are outside Canvas ([4a4e50e](https://github.com/mob-sakai/UIEffect/commit/4a4e50e01fb50925352c73b27901024494ae933c))
## [5.10.7](https://github.com/mob-sakai/UIEffect/compare/5.10.6...5.10.7) (2025-12-18)
### Bug Fixes
* support Unity 6000.4 ([7fc0c73](https://github.com/mob-sakai/UIEffect/commit/7fc0c7364d8dc39e26eac3c3b79797b139f09817))
## [5.10.6](https://github.com/mob-sakai/UIEffect/compare/5.10.5...5.10.6) (2025-12-18)
### Bug Fixes
* fixed an issue where shader variants were not registered automatically ([6b79864](https://github.com/mob-sakai/UIEffect/commit/6b79864a394d79e6ad13f64af1d521fab1f781a7)), closes [#383](https://github.com/mob-sakai/UIEffect/issues/383)
## [5.10.5](https://github.com/mob-sakai/UIEffect/compare/5.10.4...5.10.5) (2025-11-20)
### Bug Fixes
* graphic disappears when changing filters from code ([8776057](https://github.com/mob-sakai/UIEffect/commit/87760570ec7f4e2ca395cfaa0d2ab5d28c9cf9f3)), closes [#382](https://github.com/mob-sakai/UIEffect/issues/382)
## [5.10.4](https://github.com/mob-sakai/UIEffect/compare/5.10.3...5.10.4) (2025-10-27)
### Bug Fixes
* remove `sealed` from `UIEffect` and `UIEffectReplica` ([2fd87e9](https://github.com/mob-sakai/UIEffect/commit/2fd87e909af65bf88a9c39cd157dfb06a56b3af0)), closes [#379](https://github.com/mob-sakai/UIEffect/issues/379)
## [5.10.3](https://github.com/mob-sakai/UIEffect/compare/5.10.2...5.10.3) (2025-10-22)
### Bug Fixes
* displays as black rectangle when opening editor ([4a8d341](https://github.com/mob-sakai/UIEffect/commit/4a8d341625f73d70c512f7e6f0b864be1adbf459)), closes [#376](https://github.com/mob-sakai/UIEffect/issues/376)
## [5.10.2](https://github.com/mob-sakai/UIEffect/compare/5.10.1...5.10.2) (2025-10-16)
### Bug Fixes
* [improve performance] code optimization ([e6fb78a](https://github.com/mob-sakai/UIEffect/commit/e6fb78a0f67ed6f70be08259f674ab2f83364bd7))
## [5.10.1](https://github.com/mob-sakai/UIEffect/compare/5.10.0...5.10.1) (2025-10-06)
### Bug Fixes
* [improve performance] `UpdateViewMatrix` is called even though (direct-)parent canvas is disabled ([533d7b8](https://github.com/mob-sakai/UIEffect/commit/533d7b8c0a33871b1849fbda862d4fa1899822f4)), closes [#373](https://github.com/mob-sakai/UIEffect/issues/373)
# [5.10.0](https://github.com/mob-sakai/UIEffect/compare/5.9.7...5.10.0) (2025-09-26)
### Bug Fixes
* `TmpProxy` causes loss of modifications from other `IMeshModifiers` ([c4202b4](https://github.com/mob-sakai/UIEffect/commit/c4202b45d28fa84567a5671baaef8fa3e3df85dc)), closes [#371](https://github.com/mob-sakai/UIEffect/issues/371)
* display may disappear when using TMP SubMesh (multi-language or sprites, etc.) ([b4adb32](https://github.com/mob-sakai/UIEffect/commit/b4adb325120eeed64af1d9cb2468a1e1e8e10812)), closes [#372](https://github.com/mob-sakai/UIEffect/issues/372)
* TMP Text sprite submesh lost when changing fontMaterial ([59874dd](https://github.com/mob-sakai/UIEffect/commit/59874ddffe356f927dc8ff9b157c54043e149522)), closes [#368](https://github.com/mob-sakai/UIEffect/issues/368)
### Features
* [improve performance] merged apply_color function and reduced shader compilation size ([ce69258](https://github.com/mob-sakai/UIEffect/commit/ce692580a33c0c433fd7fadb64a3dcda0121b2ff))
* [improve performance] various view matrices are only updated when necessary ([6c808aa](https://github.com/mob-sakai/UIEffect/commit/6c808aa3417450fd1ce0fc6fbfe0adffdff9a79a))
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)
### Bug Fixes
* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)
### Bug Fixes
* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
## [5.9.5](https://github.com/mob-sakai/UIEffect/compare/5.9.4...5.9.5) (2025-06-26)
### Bug Fixes
* `GetGradientKeys` and `GetTransitionGradientKeys` cannot get GradientMode ([fd2d1b8](https://github.com/mob-sakai/UIEffect/commit/fd2d1b80592ac4ea62e15b6150be63964b113fa2)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
## [5.9.4](https://github.com/mob-sakai/UIEffect/compare/5.9.3...5.9.4) (2025-06-25)
### Bug Fixes
* colors specified in UIEffect are output differently in linear color space ([0d7fb1e](https://github.com/mob-sakai/UIEffect/commit/0d7fb1eb63881b67f2658567750a83c92187df35)), closes [#359](https://github.com/mob-sakai/UIEffect/issues/359)
## [5.9.3](https://github.com/mob-sakai/UIEffect/compare/5.9.2...5.9.3) (2025-06-23)
### Bug Fixes
* add `GetGradientKeys` and `GetTransitionGradientKeys` APIs ([a0c3e49](https://github.com/mob-sakai/UIEffect/commit/a0c3e4997af181ae16744c53ad3867e2106ccff3)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
* support world canvas without UI events ([cadbb8d](https://github.com/mob-sakai/UIEffect/commit/cadbb8d68d17a2ec7e2d6e8e885d711e61fa53af)), closes [#356](https://github.com/mob-sakai/UIEffect/issues/356) [#357](https://github.com/mob-sakai/UIEffect/issues/357)
## [5.9.2](https://github.com/mob-sakai/UIEffect/compare/5.9.1...5.9.2) (2025-06-12)
### Bug Fixes
* TextMeshPro 3.2.0-pre support ([804b48c](https://github.com/mob-sakai/UIEffect/commit/804b48c73ec648eaceb720cb79551fdbf3729fc9)), closes [#355](https://github.com/mob-sakai/UIEffect/issues/355)
## [5.9.1](https://github.com/mob-sakai/UIEffect/compare/5.9.0...5.9.1) (2025-06-11)
### Bug Fixes
* prefabs will be deselected when editing them ([8addbad](https://github.com/mob-sakai/UIEffect/commit/8addbad4941340807d824e295280473d197d889f)), closes [#354](https://github.com/mob-sakai/UIEffect/issues/354)
# [5.9.0](https://github.com/mob-sakai/UIEffect/compare/5.8.7...5.9.0) (2025-06-09)
### Bug Fixes
* `GradationMode.RadialFast` and `GradationMode.RadialDetail` are obsolete ([1a923dd](https://github.com/mob-sakai/UIEffect/commit/1a923dd72c263de5480d71bd17b697feca317ef1))
* soft masking not working with `DetailFilter.Masking` ([ffdeaa7](https://github.com/mob-sakai/UIEffect/commit/ffdeaa7e2f1c2a9ccb7eb21d5674e2c19021aef9))
### Features
* `GradationGradient` supports HDR color ([50f6b3c](https://github.com/mob-sakai/UIEffect/commit/50f6b3c5d20b93a2245f6d54b6eb4bc13565c3b5))
* add `Clear` method to reset properties via script ([264c453](https://github.com/mob-sakai/UIEffect/commit/264c453bb6ebad08ef950b0cec2f38e60a1710d8)), closes [#337](https://github.com/mob-sakai/UIEffect/issues/337)
* add `GradationMode.RadialGradient` feature ([179ec89](https://github.com/mob-sakai/UIEffect/commit/179ec89a0215af9d8046e150d98fa06371155e93)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationReverse` option for gradient ([c0fec32](https://github.com/mob-sakai/UIEffect/commit/c0fec32d502ec1f9d03172ed200f4d9233506eb9)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationWrapMode` option ([f98929d](https://github.com/mob-sakai/UIEffect/commit/f98929d7e9656b4c02d5545b3893748c963d1118))
* add `TransitionFilter.Blaze` feature ([ed4716d](https://github.com/mob-sakai/UIEffect/commit/ed4716d7ada102fe0053480941925e9f27b1c2c3))
* add new built-in presets ([4f2c9f1](https://github.com/mob-sakai/UIEffect/commit/4f2c9f12b5e115bab1418a7a0b1187269a041fc4))
* improve performance for TextMeshPro ([6af520e](https://github.com/mob-sakai/UIEffect/commit/6af520ed408f2e5eb4d84ec0df484338719ebc8e))
* timeline package support ([742a5cd](https://github.com/mob-sakai/UIEffect/commit/742a5cd8dc47500de4b111a132d7a8b242844342)), closes [#347](https://github.com/mob-sakai/UIEffect/issues/347)
* update shaders in samples ([4c6cd11](https://github.com/mob-sakai/UIEffect/commit/4c6cd11d86582f2351c40374180828ad1c8955c3))
## [5.8.7](https://github.com/mob-sakai/UIEffect/compare/5.8.6...5.8.7) (2025-06-09)
### Bug Fixes
* `GradationGradient` and `TransitionGradient` in reprica will be not dirty (editor) ([58b197e](https://github.com/mob-sakai/UIEffect/commit/58b197e551aea8efca10e12da8df132853d4a24e))
* changes not reflected in rendering when TextMeshPro is cleared ([f508eb3](https://github.com/mob-sakai/UIEffect/commit/f508eb32caf6757eb4c27b98ac29a1582dcd14b4)), closes [#351](https://github.com/mob-sakai/UIEffect/issues/351)
* setting `gradationScale` to 0 throws `DivideByZeroException` ([ecd265e](https://github.com/mob-sakai/UIEffect/commit/ecd265e4828c7f81c96a76c16df147b6c4804429))
## [5.8.6](https://github.com/mob-sakai/UIEffect/compare/5.8.5...5.8.6) (2025-05-22)
### Bug Fixes
* some methods may be called multiple times when domain reload on play is disabled (editor) ([3b52c3a](https://github.com/mob-sakai/UIEffect/commit/3b52c3a8fc67980d426b8e4e2ed2067c725ca262))
## [5.8.5](https://github.com/mob-sakai/UIEffect/compare/5.8.4...5.8.5) (2025-05-22)
### Bug Fixes
* skip processing when graphic is invalid ([5cd48a4](https://github.com/mob-sakai/UIEffect/commit/5cd48a463309270ec3d6501bde2add9944bbaf02))
* TextMeshPro strikethrough and underline not displaying ([68ebae2](https://github.com/mob-sakai/UIEffect/commit/68ebae28e02045cb45996bf5b77d7d93d2f0ca82)), closes [#344](https://github.com/mob-sakai/UIEffect/issues/344)
* TMP SubMeshUI generates overhead every frame (since 5.6.0) ([791d867](https://github.com/mob-sakai/UIEffect/commit/791d8670761902466d81412d832cddf013cd28cd)), closes [#343](https://github.com/mob-sakai/UIEffect/issues/343) [#345](https://github.com/mob-sakai/UIEffect/issues/345)
## [5.8.4](https://github.com/mob-sakai/UIEffect/compare/5.8.3...5.8.4) (2025-04-30)
### Bug Fixes
* NRE while canvas is disabled ([a3773e3](https://github.com/mob-sakai/UIEffect/commit/a3773e33028c60517fb4e6c534f6280194df8e64)), closes [#342](https://github.com/mob-sakai/UIEffect/issues/342)
## [5.8.3](https://github.com/mob-sakai/UIEffect/compare/5.8.2...5.8.3) (2025-04-30)
@@ -3,7 +3,9 @@
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:735c8f008d0ad4caa9cdc4306f1c3042"
"GUID:735c8f008d0ad4caa9cdc4306f1c3042",
"GUID:f06555f75b070af458a003d92f9efb00",
"GUID:02f771204943f4a40949438e873e3eff"
],
"includePlatforms": [
"Editor"
@@ -24,6 +26,11 @@
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TMP_ENABLE"
},
{
"name": "com.unity.timeline",
"expression": "1.0.0",
"define": "TIMELINE_ENABLE"
}
],
"noEngineReferences": false
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3150c4c70d45b46d389368100b181ee4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,183 @@
#if TIMELINE_ENABLE
using System;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEditor.Timeline;
using UnityEngine;
using UnityEngine.Timeline;
namespace Coffee.UIEffects.Timeline
{
public abstract class UIEffectClipEditor : ClipEditor
{
public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region)
{
var director = TimelineEditor.inspectedDirector;
if (director == null) return;
var viewDuration = region.endTime - region.startTime;
var inDuration = (float)Math.Max(clip.easeInDuration, clip.blendInDuration);
var outDuration = (float)Math.Max(clip.easeOutDuration, clip.blendOutDuration);
inDuration = 0 < inDuration ? Mathf.Max(inDuration - (float)region.startTime, 0) : 0f;
outDuration = 0 < outDuration ? Mathf.Max(outDuration - (float)(clip.duration - region.endTime), 0) : 0f;
var p = region.position;
p.x += p.width * (float)(inDuration / viewDuration);
p.width -= p.width * (float)((inDuration + outDuration) / viewDuration);
DrawBackground(p, clip);
}
public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom)
{
clip.displayName = ObjectNames.NicifyVariableName(track.GetType().Name.Replace("Track", ""));
if (clip.asset is UIEffectClip uiEffectClip)
{
uiEffectClip.timelineClip = clip;
}
var floatClip = clip.asset as UIEffectFloatClip;
if (floatClip != null)
{
if (track is GradationRotationTrack || track is GradationOffsetTrack)
{
floatClip.m_Data.m_From = 0f;
floatClip.m_Data.m_Value = 0f;
}
}
}
protected abstract void DrawBackground(Rect rect, TimelineClip clip);
}
[CustomTimelineEditor(typeof(UIEffectFloatClip))]
public class UIEffectFloatClipEditor : UIEffectClipEditor
{
private static GUIStyle s_FromStyle;
private static GUIStyle s_ToStyle;
protected override void DrawBackground(Rect rect, TimelineClip clip)
{
var asset = clip.asset as UIEffectFloatClip;
if (asset == null) return;
if (s_FromStyle == null)
{
s_FromStyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.UpperLeft, fontSize = 9 };
s_ToStyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.UpperRight, fontSize = 9 };
}
var d = asset.m_Data;
if (d.m_Tween)
{
DrawLabelWithShadow(rect, asset.m_Data.m_From.ToString("F2"), s_FromStyle);
DrawLabelWithShadow(rect, asset.m_Data.m_Value.ToString("F2"), s_ToStyle);
}
else
{
DrawLabelWithShadow(rect, asset.m_Data.m_Value.ToString("F2"), s_FromStyle);
}
}
private static void DrawLabelWithShadow(Rect position, string text, GUIStyle style)
{
GUI.color = Color.black;
EditorGUI.LabelField(position, text, style);
GUI.color = Color.white;
position.x -= 1f;
position.y -= 1f;
EditorGUI.LabelField(position, text, style);
}
}
[CustomTimelineEditor(typeof(UIEffectColorClip))]
public class UIEffectColorClipEditor : UIEffectClipEditor
{
protected override void DrawBackground(Rect p, TimelineClip clip)
{
var asset = clip.asset as UIEffectColorClip;
if (asset == null) return;
var d = asset.m_Data;
if (d.m_Tween)
{
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + 2, p.y, 8, 8), d.m_From);
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + p.width - 8, p.y, 8, 8), d.m_Value);
}
else
{
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + 2, p.y, 8, 8), d.m_Value);
}
}
}
[CustomEditor(typeof(UIEffectClip<>), true)]
public class UIEffectClipAssetEditor : Editor
{
private SerializedProperty _tween;
private SerializedProperty _from;
private SerializedProperty _curve;
private SerializedProperty _value;
private FloatClipUsageAttribute _floatUsage;
private ColorClipUsageAttribute _colorUsage;
private GUIContent _label;
private void OnEnable()
{
var data = serializedObject.FindProperty("m_Data");
_tween = data.FindPropertyRelative("m_Tween");
_from = data.FindPropertyRelative("m_From");
_curve = data.FindPropertyRelative("m_Curve");
_value = data.FindPropertyRelative("m_Value");
var clip = target as UIEffectClip;
var type = clip.timelineClip.GetParentTrack().GetType();
_floatUsage = type.GetCustomAttribute<FloatClipUsageAttribute>();
_colorUsage = type.GetCustomAttribute<ColorClipUsageAttribute>();
_label = new GUIContent(ObjectNames.NicifyVariableName(type.Name).Replace(" Track", ""));
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_tween);
if (_tween.boolValue)
{
EditorGUI.indentLevel++;
DrawProperty(_from, EditorGUIUtility.TrTempContent("From"));
EditorGUILayout.PropertyField(_curve);
EditorGUI.indentLevel--;
}
DrawProperty(_value, _label);
serializedObject.ApplyModifiedProperties();
}
private void DrawProperty(SerializedProperty property, GUIContent label)
{
if (_floatUsage != null)
{
EditorGUILayout.Slider(property, _floatUsage.min, _floatUsage.max, label);
}
else if (property.propertyType == SerializedPropertyType.Color)
{
var hdr = UIEffectProjectSettings.useHdrColorPicker;
var alpha = _colorUsage?.alpha ?? true;
EditorGUI.BeginChangeCheck();
var color = EditorGUILayout.ColorField(label, property.colorValue, true, alpha, hdr);
if (EditorGUI.EndChangeCheck())
{
property.colorValue = color;
}
}
else
{
EditorGUILayout.PropertyField(property, label);
}
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d108727fec4d48d28c1609b01a3a8c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -10,22 +10,21 @@ using UnityEditorInternal;
namespace Coffee.UIEffects.Editors
{
[CustomEditor(typeof(UIEffectProjectSettings))]
public class UIEffectProjectSettingsEditor : Editor
internal class UIEffectProjectSettingsEditor : PreloadedProjectSettingsEditor
{
private ReorderableList _reorderableList;
private SerializedProperty _runtimePresets;
private SerializedProperty _runtimePresetsV2;
private SerializedProperty _useHDRColorPicker;
private bool _isInitialized;
private ShaderVariantRegistryEditor _shaderVariantRegistryEditor;
private UIEffect[] _legacyPresets;
private bool _expandRuntimePresets;
private bool _expandLegacyPrefabs;
private void InitializeIfNeeded()
protected override void OnEnable()
{
if (_isInitialized) return;
base.OnEnable();
_legacyPresets = UIEffectProjectSettings.LoadEditorPresets();
_useHDRColorPicker = serializedObject.FindProperty("m_UseHDRColorPicker");
_runtimePresets = serializedObject.FindProperty("m_RuntimePresets");
_runtimePresetsV2 = serializedObject.FindProperty("m_RuntimePresetsV2");
@@ -39,7 +38,7 @@ namespace Coffee.UIEffects.Editors
rect.y += 2;
rect.height = EditorGUIUtility.singleLineHeight;
EditorGUI.BeginDisabledGroup(effect && effect.hideFlags == HideFlags.NotEditable);
EditorGUI.BeginDisabledGroup(effect != null && effect.hideFlags == HideFlags.NotEditable);
EditorGUI.PropertyField(rect, element, GUIContent.none);
EditorGUI.EndDisabledGroup();
};
@@ -50,23 +49,18 @@ namespace Coffee.UIEffects.Editors
UIEffectProjectSettings.RegisterRuntimePreset);
};
_isInitialized = true;
}
private void OnEnable()
{
_legacyPresets = UIEffectProjectSettings.LoadEditorPresets();
}
private void OnDisable()
{
_isInitialized = false;
_shaderVariantRegistryEditor = ShaderVariantRegistryEditor.Create(serializedObject, "(UIEffect)",
() =>
{
UIEffectProjectSettings.shaderRegistry
.RegisterOptionalShaders(UIEffectProjectSettings.instance);
});
}
public override void OnInspectorGUI()
{
serializedObject.Update();
InitializeIfNeeded();
EditorGUIUtility.labelWidth = 180;
base.OnInspectorGUI();
// Settings
// Runtime Presets
@@ -83,27 +77,18 @@ namespace Coffee.UIEffects.Editors
// Shader registry
EditorGUILayout.Space();
EditorGUILayout.LabelField("Shader", EditorStyles.boldLabel);
if (_shaderVariantRegistryEditor == null)
{
var property = serializedObject.FindProperty("m_ShaderVariantRegistry");
_shaderVariantRegistryEditor = new ShaderVariantRegistryEditor(property, "(UIEffect)",
() =>
{
UIEffectProjectSettings.shaderRegistry
.RegisterOptionalShaders(UIEffectProjectSettings.instance);
});
}
_shaderVariantRegistryEditor.Draw();
GUILayout.FlexibleSpace();
DrawPreLoadSettingsInBuild("UIEffect");
serializedObject.ApplyModifiedProperties();
GUILayout.FlexibleSpace();
}
private void DrawLegacyPresets()
{
for (var i = _runtimePresets.arraySize - 1; 0 <= i; i--)
{
if (!_runtimePresets.GetArrayElementAtIndex(i).objectReferenceValue)
if (_runtimePresets.GetArrayElementAtIndex(i).objectReferenceValue == null)
{
_runtimePresets.DeleteArrayElementAtIndex(i);
}
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 1a9c54e67e8c9495fa77bfe119825877
timeCreated: 1487152293
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
+16 -2
View File
@@ -47,6 +47,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _transitionColorGlow;
private SerializedProperty _transitionPatternReverse;
private SerializedProperty _transitionAutoPlaySpeed;
private SerializedProperty _transitionGradient;
private SerializedProperty _targetMode;
private SerializedProperty _targetColor;
@@ -80,6 +81,8 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _gradationOffset;
private SerializedProperty _gradationScale;
private SerializedProperty _gradationRotation;
private SerializedProperty _gradationWrapMode;
private SerializedProperty _gradationReverse;
private SerializedProperty _edgeMode;
private SerializedProperty _edgeWidth;
@@ -135,6 +138,7 @@ namespace Coffee.UIEffects.Editors
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
_transitionGradient = serializedObject.FindProperty("m_TransitionGradient");
s_RotationLabel.tooltip = _transitionRotation.tooltip;
s_KeepAspectRatioLabel.tooltip = _transitionKeepAspectRatio.tooltip;
@@ -181,6 +185,8 @@ namespace Coffee.UIEffects.Editors
_gradationOffset = serializedObject.FindProperty("m_GradationOffset");
_gradationScale = serializedObject.FindProperty("m_GradationScale");
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
_gradationWrapMode = serializedObject.FindProperty("m_GradationWrapMode");
_gradationReverse = serializedObject.FindProperty("m_GradationReverse");
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
@@ -223,8 +229,6 @@ namespace Coffee.UIEffects.Editors
EditorGUI.indentLevel--;
}
EditorGUI.EndChangeCheck();
// Sampling filter
DrawSeparator();
if (DrawHeaderPopup(_samplingFilter))
@@ -269,6 +273,11 @@ namespace Coffee.UIEffects.Editors
EditorGUIUtility.TrTempContent("Pattern Reverse"));
DrawColor(_transitionColorFilter, _transitionColor, null);
}
else if (_transitionFilter.intValue == (int)TransitionFilter.Blaze)
{
EditorGUILayout.PropertyField(_transitionWidth);
DrawGradientField(_transitionGradient);
}
else if (2 < _transitionFilter.intValue)
{
EditorGUILayout.PropertyField(_transitionWidth);
@@ -363,7 +372,12 @@ namespace Coffee.UIEffects.Editors
case GradationMode.HorizontalGradient:
case GradationMode.VerticalGradient:
case GradationMode.AngleGradient:
case GradationMode.RadialGradient:
DrawGradientField(_gradationGradient);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_gradationWrapMode, EditorGUIUtility.TrTempContent("Wrap Mode"));
EditorGUILayout.PropertyField(_gradationReverse, EditorGUIUtility.TrTempContent("Reverse"));
EditorGUI.indentLevel--;
break;
case GradationMode.Diagonal:
DrawColorPickerField("Top", _gradationColor1, _gradationColor2);
+2 -2
View File
@@ -34,7 +34,7 @@ namespace Coffee.UIEffects.Editors
var r = EditorGUILayout.GetControlRect();
r.width -= 120;
if (_preset.objectReferenceValue)
if (_preset.objectReferenceValue != null)
{
EditorGUI.PropertyField(r, _preset);
}
@@ -81,7 +81,7 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
var parent = _target.objectReferenceValue ?? _preset.objectReferenceValue;
if (parent)
if (parent != null)
{
EditorGUI.BeginDisabledGroup(true);
CreateCachedEditor(parent, null, ref _uiEffectEditor);
+1 -1
View File
@@ -90,7 +90,7 @@ namespace Coffee.UIEffects.Editors
private void DrawPlayer(UIEffectTweener tweener)
{
if (!tweener) return;
if (tweener == null) return;
EditorGUILayout.Space(4);
GUILayout.Label(GUIContent.none, "sv_iconselector_sep", GUILayout.ExpandWidth(true));
+84 -18
View File
@@ -7,6 +7,7 @@
![](https://img.shields.io/badge/Unity-6000.0+-57b9d3.svg?style=flat&logo=unity)
![](https://img.shields.io/badge/TextMeshPro_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/ShaderGraph_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/Timeline_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/UPR%2FHDPR_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/VR_Support-57b9d3.svg?style=flat)
[![](https://img.shields.io/github/license/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/blob/main/LICENSE.md)
@@ -20,9 +21,12 @@
## 📝 Description <!-- omit in toc -->
**_"Decorate your UI, simply and powerfully."_**
UIEffect is an open-source package that allows you to intuitively apply rich Unity UI effects directly from the Inspector or via code.
Combine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!
**_"Decorate your UI, simply and powerfully."_**
UIEffect is a powerful, open-source Unity package that transforms your UI with stunning visual effects.
Apply professional-grade filters like grayscale, blur, and dissolve directly from the Inspector—no coding required!
✨ **Perfect for**: Game developers, UI designers, and anyone looking to enhance their Unity UI with minimal effort
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-title.png)
@@ -55,6 +59,8 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
- [Usage with TextMeshPro](#usage-with-textmeshpro)
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
- [Usage with ShaderGraph](#usage-with-shadergraph)
- [Usage with Timeline](#usage-with-timeline)
- [Usage with Custom Shader](#usage-with-custom-shader)
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
- [Usage with Code](#usage-with-code)
- [Project Settings](#project-settings)
@@ -88,18 +94,18 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
- **ShaderGraph support (optional)**: Add `Canvas (UIEffect)` sub target (material) for UIEffect shaders. See for more details [here](#usage-with-shadergraph).
- **Timeline support**: Control UIEffect using Timeline with `ControlTrack` and `UIEffect Tracks`. See for more details [here](#usage-with-timeline).
<br><br>
## 🎮 Demo
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-available.png)
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749461316801.png)
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-pattern.gif" width="582"/>
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-showcase.png)
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-tmp.png)
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
[Try the WebGL Demo](https://mob-sakai.github.io/UIEffect/)
<br><br>
@@ -117,7 +123,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
```
openupm add com.coffee.ui-effect@5.7.0
openupm add com.coffee.ui-effect@5.9.0
```
### Install via UPM (with Package Manager UI)
@@ -126,7 +132,7 @@ _This package requires **Unity 2020.3 or later**._
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/upm-add-from-url.png)
- To update the package, change suffix `#{version}` to the target version.
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0`
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.0`
### Install via UPM (Manually)
@@ -141,7 +147,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, change suffix `#{version}` to the target version.
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0",`
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.0",`
### Install as Embedded Package
@@ -198,10 +204,18 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
2. Add a `UIEffect` component to a UI element (Image, RawImage, Text, TextMeshProUGUI, etc...) from the `Add Component` in the inspector or `Component > UI > UIEffect` menu.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-add-component.png)
3. Adjust the effect filters and parameters in the inspector.
3. Set `Tone Filter` to `Grayscale` and `Tone Intensity` to `1.0`.
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749029605043.png" width="480"/>
4. Try other effect filters and parameters in the inspector.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744308178360.gif)
4. From the top menu, you can load/append preset.
5. From the top menu, you can load/append preset.
> [!TIP]
>
> `Load` overwrites all properties with the preset, while `Append` only overwrites enabled filters and modes with the preset.
> You can easily build effects by combining them with `Append`.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744800851739.gif)
5. Enjoy!
@@ -256,8 +270,8 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-inspector-transition.png)
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-sample-transition.png)
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Blaze`, `Pattern`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749466907712.gif)
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
- **Transition Tex**: The texture used for the transition filter.
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
@@ -271,6 +285,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Transition Color**: The color of the transition.
- **Transition Color Glow**: Set the transition color to glow.
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
- ⚠️ NOTE: This uses scaled time (affected by `Time.timeScale`). If you need unscaled time (useful for pause-resistant effects), use the [UIEffectTweener](#component-uieffecttweener) component instead.
> [!TIP]
> **Transition Tex** applies transitions using its alpha channel.
@@ -325,10 +340,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744305109784.png)
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-sample-gradation.png)
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `RadialGradient`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749461050342.png)
- **Gradation Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`
- **Gradation Gradient**: The gradient of the gradation.
- **Gradation Gradient**: The gradient of the gradation. HDR colors are supported.
- `Blend` and `Fixed` modes are available.
- **Gradation Color 1**: The first color of the gradation.
- **Gradation Color 2**: The second color of the gradation.
@@ -336,6 +351,8 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Gradation Offset**: The offset of the gradation range.
- **Gradation Scale**: The scale of the gradation range.
- **Gradation Rotation** (`Angle` or `AngleGradient` only): The rotation of the gradation range.
- **Gradation Wrap Mode**: `Repaet`, `Clamp`, `Mirror`, `Mirror Once`
- **Gradation Reverse**: Reverse the gradient.
- **Keep Aspect Ratio**:
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
@@ -353,6 +370,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Edge Color Glow**: Set the shadow color to glow.
- **Edge Shiny Width**: The width of the edge shiny.
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny (using shader side `_Time`).
- ⚠️ NOTE: This uses scaled time (affected by `Time.timeScale`). If you need unscaled time (useful for pause-resistant effects), use the [UIEffectTweener](#component-uieffecttweener) component instead.
<br>
@@ -442,8 +460,8 @@ You can preview the animation using the seek bar and play button.
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
- **Target**: The target `UIEffect` component to replicate.
> [!TIP]
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
> [!TIP]
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
- **Use Target Transform**: Use the target's transform for some effects.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-sample-custom-root.gif)
- **Custom Root**: Use the custom transform for some effects.
@@ -498,6 +516,8 @@ Click the `Import` button.
### Usage with ShaderGraph
⚠️ ShaderGraph support is available only in Unity 2023.2/6.0 or later.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744307236288.png)
To use UIEffect with ShaderGraph, you need to import additional resources.
@@ -515,6 +535,37 @@ To use UIEffect with ShaderGraph, you need to import additional resources.
<br><br>
### Usage with Timeline
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749028017092.png)
Timeline is a powerful animation tool that can control UIEffect using `ControlTrack` and UIEffect tracks.
- `Control Track`: One of the built-in tracks. When you assign a GameObject with `UIEffect`, `UIEffect` will be enabled during the clip duration.
- `UIEffect Tracks`: Tracks for UIEffect. They control `float` or `Color` type properties.
- Supports blending, extrapolation, and tween.
<br><br>
### Usage with Custom Shader
To make your custom shader support UIEffect, it must satisfy the following requirements.
Refer to the sections enclosed by `==== UIEFFECT START ===` and `==== UIEFFECT END ====` in the built-in `Hidden/UI/Default (UIEffect)` shader included in the package.
https://github.com/mob-sakai/UIEffect/blob/main/Packages/src/Shaders/UIEffect.shader
- Blend: `Blend [_SrcBlend] [_DstBlend]`
- Shader variants: `#pragma shader_feature_local_fragment ***`
- Vertex shader input structure: `float4 uvMask : TEXCOORD***;`
- Vertex shader: `OUT.uvMask = v.uvMask;` and `OUT.worldPosition = v.vertex;`
- Pixel shader input structure: `float4 uvMask : TEXCOORD***;` and `float4 worldPosition : TEXCOORD***;`
- UIEffect micro pixel shader: a function that returns the color of the specified pixel and has the signature `half4 uieffect_frag(v2f IN, float2 uv)`.
- Pixel shader input structure name definition: `#define UIEFFECT_FRAG_STRUCT v2f`
- Include the UIEffect library: `#include "Packages/com.coffee.ui-effect/Shaders/UIEffect.cginc"`
- Pixel shader: `half4 c = uieffect(IN.texcoord, IN.uvMask, IN.worldPosition, IN);`
<br><br>
### Runtime/Editor Preset for UIEffect
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-inspector-preset.png)
@@ -601,6 +652,21 @@ You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings
> - The setting file is usually saved in `Assets/ProjectSettings/UIEffectProjectSettings.asset`. Include this file in your version control system.
> - The setting file is automatically added as a preloaded asset in `ProjectSettings/ProjectSettings.asset`.
#### Advanced
- **Pre Load Settings In Build**: When enabled, this settings asset will be added to `PlayerSettings.preloadedAssets` in build.
- When disable, you should load this settings via `Resources`, `AssetBundles` or `Addressables` to use `UIEffect`.
- You can overwrite the settings by re-enabling `UIEffectProjectSettings`. This allows you to hot update shader variants and presets.
```csharp
private static IEnumerator HotUpdateCoroutine()
{
const string k_SettingsAddress = "Assets/ProjectSettings/UIEffectProjectSettings.asset";
yield return Addressables.LoadAssetAsync<UIEffectProjectSettings>(k_SettingsAddress);
while (UIEffectProjectSettings.shaderVariantCollection.WarmUpProgressively(5) == false) yield return null;
}
```
<br><br>
### :warning: Limitations
+12 -1
View File
@@ -2,7 +2,8 @@
"name": "Coffee.UIEffect",
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f"
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:f06555f75b070af458a003d92f9efb00"
],
"includePlatforms": [],
"excludePlatforms": [],
@@ -21,6 +22,16 @@
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TMP_ENABLE"
},
{
"name": "com.unity.timeline",
"expression": "1.0.0",
"define": "TIMELINE_ENABLE"
},
{
"name": "com.unity.textmeshpro",
"expression": "[1.0.0,3.2.0-pre.1)",
"define": "LEGACY_TMP_ENABLE"
}
],
"noEngineReferences": false
+7
View File
@@ -59,6 +59,7 @@ namespace Coffee.UIEffects
Mask = 5,
Melt = 6,
Burn = 7,
Blaze = 9,
Pattern = 8
}
@@ -110,8 +111,14 @@ namespace Coffee.UIEffects
HorizontalGradient = 2,
Vertical = 3,
VerticalGradient = 4,
Radial = 5,
[Obsolete]
RadialFast = 5,
[Obsolete]
RadialDetail = 6,
RadialGradient = 12,
Diagonal = 11,
DiagonalToRightBottom = 7,
DiagonalToLeftBottom = 8,
@@ -12,6 +12,33 @@ namespace Coffee.UIEffectInternal
/// </summary>
internal static class ComponentExtensions
{
#if !UNITY_2019_2_OR_NEWER
public static bool TryGetComponent<T>(this GameObject self, out T component)
where T : Component
{
if (self == null)
{
component = null;
return false;
}
component = self.GetComponent<T>();
return component != null;
}
public static bool TryGetComponent<T>(this Component self, out T component)
where T : Component
{
if (self == null)
{
component = null;
return false;
}
return self.gameObject.TryGetComponent(out component);
}
#endif
/// <summary>
/// Get components in children of a specific type in the hierarchy of a GameObject.
/// </summary>
@@ -38,7 +65,7 @@ namespace Coffee.UIEffectInternal
private static void GetComponentsInChildren_Internal<T>(this Component self, List<T> results, int depth)
where T : Component
{
if (!self || results == null || depth < 0) return;
if (self == null || results == null || depth < 0) return;
var tr = self.transform;
if (tr.TryGetComponent<T>(out var t))
@@ -59,7 +86,7 @@ namespace Coffee.UIEffectInternal
/// </summary>
public static T GetOrAddComponent<T>(this Component self) where T : Component
{
if (!self) return null;
if (self == null) return null;
return self.TryGetComponent<T>(out var component)
? component
: self.gameObject.AddComponent<T>();
@@ -72,7 +99,7 @@ namespace Coffee.UIEffectInternal
{
T component = null;
var transform = self.transform;
while (transform)
while (transform != null)
{
if (transform.TryGetComponent<T>(out var c))
{
@@ -93,7 +120,7 @@ namespace Coffee.UIEffectInternal
where T : Component
{
var tr = includeSelf ? self.transform : self.transform.parent;
while (tr)
while (tr != null)
{
if (tr.TryGetComponent<T>(out var c) && valid(c)) return c;
if (tr == stopAfter) return null;
@@ -166,11 +193,11 @@ namespace Coffee.UIEffectInternal
#if !UNITY_2021_2_OR_NEWER && !UNITY_2020_3_45 && !UNITY_2020_3_46 && !UNITY_2020_3_47 && !UNITY_2020_3_48
public static T GetComponentInParent<T>(this Component self, bool includeInactive) where T : Component
{
if (!self) return null;
if (self == null) return null;
if (!includeInactive) return self.GetComponentInParent<T>();
var current = self.transform;
while (current)
while (current != null)
{
if (current.TryGetComponent<T>(out var c)) return c;
current = current.parent;
@@ -186,7 +213,7 @@ namespace Coffee.UIEffectInternal
/// </summary>
internal static bool CanConvertTo<T>(this Object context) where T : MonoBehaviour
{
return context && context.GetType() != typeof(T);
return context != null && context.GetType() != typeof(T);
}
/// <summary>
@@ -19,7 +19,7 @@ namespace Coffee.UIEffectInternal
mesh => mesh,
mesh =>
{
if (mesh)
if (mesh != null)
{
mesh.Clear();
}
@@ -37,7 +37,7 @@ namespace Coffee.UIEffectInternal
public static void CopyTo(this Mesh self, Mesh dst)
{
if (!self || !dst) return;
if (self == null || dst == null) return;
var vector3List = InternalListPool<Vector3>.Rent();
var vector4List = InternalListPool<Vector4>.Rent();
@@ -80,9 +80,16 @@ namespace Coffee.UIEffectInternal
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 || dst == null) return;
if (self == null || dst == null) return;
var vertexCount = self.vertexCount;
var indexCount = self.triangles.Length;
@@ -91,12 +98,14 @@ namespace Coffee.UIEffectInternal
public static void CopyTo(this Mesh self, VertexHelper dst, int vertexCount, int indexCount)
{
if (!self || dst == null) return;
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();
@@ -104,6 +113,8 @@ namespace Coffee.UIEffectInternal
self.GetColors(colors);
self.GetUVs(0, uv0);
self.GetUVs(1, uv1);
self.GetUVs(2, uv2);
self.GetUVs(3, uv3);
self.GetNormals(normals);
self.GetTangents(tangents);
self.GetIndices(indices, 0);
@@ -112,7 +123,7 @@ namespace Coffee.UIEffectInternal
for (var i = 0; i < vertexCount; i++)
{
dst.AddVert(positions.GetOrDefault(i), colors.GetOrDefault(i), uv0.GetOrDefault(i), uv1.GetOrDefault(i),
normals.GetOrDefault(i), tangents.GetOrDefault(i));
uv2.GetOrDefault(i), uv3.GetOrDefault(i), normals.GetOrDefault(i), tangents.GetOrDefault(i));
}
var count = Mathf.Clamp(indexCount, 0, indices.Count);
@@ -125,6 +136,8 @@ namespace Coffee.UIEffectInternal
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);
@@ -14,20 +14,49 @@ namespace Coffee.UIEffectInternal
public abstract class PreloadedProjectSettings : ScriptableObject
#if UNITY_EDITOR
{
private class Postprocessor : AssetPostprocessor
[Tooltip("When enabled, this settings asset will be added to PlayerSettings.preloadedAssets in build.\n\n" +
"When disable, you should load this settings via Resources, AssetBundles or Addressables to use.")]
[SerializeField]
[Header("Advanced")]
[HideInInspector]
private bool m_PreLoadSettingsInBuild = true;
protected static bool s_BuildingPlayer;
private class EditorEvents : AssetPostprocessor, IPreprocessBuildWithReport, IPostprocessBuildWithReport
{
int IOrderedCallback.callbackOrder => 0;
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
{
Initialize();
}
}
private class PreprocessBuildWithReport : IPreprocessBuildWithReport
{
int IOrderedCallback.callbackOrder => 0;
void IPreprocessBuildWithReport.OnPreprocessBuild(BuildReport report)
{
AssetDatabase.Refresh();
Initialize();
s_BuildingPlayer = true;
foreach (var t in TypeCache.GetTypesDerivedFrom(typeof(PreloadedProjectSettings<>)))
{
var settings = GetDefaultSettings(t);
if (settings == null || settings.m_PreLoadSettingsInBuild) continue;
PlayerSettings.SetPreloadedAssets(
PlayerSettings.GetPreloadedAssets()
.Where(x => x != null && x.GetType() != t)
.ToArray());
Debug.Log($"[PreloadedProjectSettings] Build started: removed '{settings.name}' " +
$"({t.Name}) from PreloadedAssets. " +
$"It will be restored after build completes.");
}
}
void IPostprocessBuildWithReport.OnPostprocessBuild(BuildReport report)
{
s_BuildingPlayer = false;
Initialize();
}
}
@@ -37,18 +66,21 @@ namespace Coffee.UIEffectInternal
foreach (var t in TypeCache.GetTypesDerivedFrom(typeof(PreloadedProjectSettings<>)))
{
var defaultSettings = GetDefaultSettings(t);
if (!defaultSettings)
if (defaultSettings == null)
{
// When create a new instance, automatically set it as default settings.
defaultSettings = CreateInstance(t) as PreloadedProjectSettings;
SetDefaultSettings(defaultSettings);
if (!s_BuildingPlayer)
{
// When create a new instance, automatically set it as default settings.
defaultSettings = CreateInstance(t) as PreloadedProjectSettings;
SetDefaultSettings(defaultSettings);
}
}
else if (GetPreloadedSettings(t).Length != 1)
{
SetDefaultSettings(defaultSettings);
if (!s_BuildingPlayer) SetDefaultSettings(defaultSettings);
}
if (defaultSettings)
if (defaultSettings != null)
{
defaultSettings.OnInitialize();
}
@@ -66,22 +98,22 @@ namespace Coffee.UIEffectInternal
private static Object[] GetPreloadedSettings(Type type)
{
return PlayerSettings.GetPreloadedAssets()
.Where(x => x && x.GetType() == type)
.Where(x => x != null && x.GetType() == type)
.ToArray();
}
protected static PreloadedProjectSettings GetDefaultSettings(Type type)
{
return GetPreloadedSettings(type).FirstOrDefault() as PreloadedProjectSettings
?? AssetDatabase.FindAssets($"t:{nameof(PreloadedProjectSettings)}")
?? AssetDatabase.FindAssets($"t:{type.Name}")
.Select(AssetDatabase.GUIDToAssetPath)
.Select(AssetDatabase.LoadAssetAtPath<PreloadedProjectSettings>)
.FirstOrDefault(x => x && x.GetType() == type);
.FirstOrDefault(x => x != null && x.GetType() == type);
}
protected static void SetDefaultSettings(PreloadedProjectSettings asset)
{
if (!asset) return;
if (asset == null) return;
var type = asset.GetType();
if (string.IsNullOrEmpty(AssetDatabase.GetAssetPath(asset)))
@@ -103,7 +135,7 @@ namespace Coffee.UIEffectInternal
var preloadedAssets = PlayerSettings.GetPreloadedAssets();
var projectSettings = GetPreloadedSettings(type);
PlayerSettings.SetPreloadedAssets(preloadedAssets
.Where(x => x)
.Where(x => x != null)
.Except(projectSettings.Except(new[] { asset }))
.Append(asset)
.Distinct()
@@ -120,6 +152,35 @@ namespace Coffee.UIEffectInternal
{
}
}
internal abstract class PreloadedProjectSettingsEditor : Editor
{
private SerializedProperty _preLoadSettingsInBuild;
protected virtual void OnEnable()
{
_preLoadSettingsInBuild = serializedObject.FindProperty("m_PreLoadSettingsInBuild");
}
protected void DrawPreLoadSettingsInBuild(string packageName)
{
EditorGUILayout.PropertyField(_preLoadSettingsInBuild);
if (!_preLoadSettingsInBuild.boolValue)
{
EditorGUILayout.BeginHorizontal();
EditorGUILayout.HelpBox(
$"{target.GetType().Name} asset will not be built in.\n" +
$"please load manually from Resources, AssetBundle, or Addressables before using {packageName}.",
MessageType.Warning);
if (GUILayout.Button("Ping"))
{
EditorGUIUtility.PingObject(target);
}
EditorGUILayout.EndHorizontal();
}
}
}
#else
{
}
@@ -133,31 +194,33 @@ namespace Coffee.UIEffectInternal
#if UNITY_EDITOR
private string _jsonText;
public static bool hasInstance => s_Instance;
public static bool hasInstance => s_Instance != null;
public static T instance
{
get
{
if (s_Instance) return s_Instance;
if (s_Instance != null) return s_Instance;
s_Instance = GetDefaultSettings(typeof(T)) as T;
if (s_Instance) return s_Instance;
if (s_Instance != null) return s_Instance;
s_Instance = CreateInstance<T>();
if (!s_Instance)
if (s_Instance == null)
{
s_Instance = null;
return s_Instance;
}
SetDefaultSettings(s_Instance);
if (!s_BuildingPlayer) SetDefaultSettings(s_Instance);
return s_Instance;
}
}
private void OnPlayModeStateChanged(PlayModeStateChange state)
{
if (this == null) return;
switch (state)
{
case PlayModeStateChange.ExitingEditMode:
@@ -174,7 +237,7 @@ namespace Coffee.UIEffectInternal
}
}
#else
public static T instance => s_Instance ? s_Instance : s_Instance = CreateInstance<T>();
public static T instance => s_Instance != null ? s_Instance : s_Instance = CreateInstance<T>();
#endif
/// <summary>
@@ -183,17 +246,21 @@ namespace Coffee.UIEffectInternal
protected virtual void OnEnable()
{
#if UNITY_EDITOR
var isDefaultSettings = !s_Instance || s_Instance == this || GetDefaultSettings(typeof(T)) == this;
var isDefaultSettings = s_Instance == null || s_Instance == this || GetDefaultSettings(typeof(T)) == this;
if (!isDefaultSettings)
{
DestroyImmediate(this, true);
return;
}
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
#else
if (s_Instance != null && s_Instance != this)
{
Destroy(s_Instance);
}
#endif
if (s_Instance) return;
s_Instance = this as T;
}
@@ -222,9 +289,9 @@ namespace Coffee.UIEffectInternal
public override void OnGUI(string searchContext)
{
if (!_target)
if (_target == null)
{
if (_editor)
if (_editor != null)
{
DestroyImmediate(_editor);
_editor = null;
@@ -20,21 +20,23 @@ namespace Coffee.UIEffectInternal
UpdateTmpCgincPath();
}
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
private static void OnPostprocessAllAssets(string[] imported, string[] __, string[] ___, string[] ____)
{
UpdateTmpCgincPath();
if (imported.Any(x => x.EndsWith(".cginc") || x.EndsWith(".shader")))
{
UpdateTmpCgincPath();
}
}
private static void UpdateTmpCgincPath()
{
if (s_CgincPattern == null || s_ShaderNames == null || s_ShaderNames.Length == 0) return;
AssetDatabase.StartAssetEditing();
string[] cgincs = null;
foreach (var shaderName in s_ShaderNames)
{
var shader = Shader.Find(shaderName);
if (!shader) continue;
if (shader == null) continue;
var hasCgincError = ShaderUtil.GetShaderMessages(shader)
.Any(x => Regex.IsMatch(x.message, $"Couldn't open include file.*{s_CgincPattern}"));
@@ -47,8 +49,6 @@ namespace Coffee.UIEffectInternal
UpdateTmpCgincPath(shader, cgincs);
}
AssetDatabase.StopAssetEditing();
}
private static void UpdateTmpCgincPath(Shader shader, string[] cgincs)
@@ -66,11 +66,6 @@ namespace Coffee.UIEffectInternal
node = node.Next;
}
}
public void Clear()
{
_delegates.Clear();
}
}
/// <summary>
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIEffectInternal
@@ -8,19 +9,20 @@ namespace Coffee.UIEffectInternal
{
private static readonly Dictionary<Type, IFrameCache> s_Caches = new Dictionary<Type, IFrameCache>();
static FrameCache()
{
s_Caches.Clear();
UIExtraCallbacks.onLateAfterCanvasRebuild += ClearAllCache;
}
#if UNITY_EDITOR
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
[InitializeOnLoadMethod]
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
#elif UNITY_EDITOR
[InitializeOnLoadMethod]
#else
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
private static void Clear()
{
s_Caches.Clear();
UIExtraCallbacks.onLateAfterCanvasRebuild -= ClearAllCache;
UIExtraCallbacks.onLateAfterCanvasRebuild += ClearAllCache;
}
#endif
/// <summary>
/// Tries to retrieve a value from the frame cache with a specified key.
@@ -11,7 +11,7 @@ using Conditional = System.Diagnostics.ConditionalAttribute;
namespace Coffee.UIEffectInternal
{
internal static class Logging
internal static class Logger
{
#if !ENABLE_COFFEE_LOGGER
private const string k_DisableSymbol = "DISABLE_COFFEE_LOGGER";
@@ -48,7 +48,7 @@ namespace Coffee.UIEffectInternal
public static void LogIf(bool enable, object tag, object message, Object context = null)
{
if (!enable) return;
Log_Internal(LogType.Log, tag, message, context ? context : tag as Object);
Log_Internal(LogType.Log, tag, message, context != null ? context : tag as Object);
}
#if !ENABLE_COFFEE_LOGGER
@@ -56,7 +56,7 @@ namespace Coffee.UIEffectInternal
#endif
public static void Log(object tag, object message, Object context = null)
{
Log_Internal(LogType.Log, tag, message, context ? context : tag as Object);
Log_Internal(LogType.Log, tag, message, context != null ? context : tag as Object);
}
#if !ENABLE_COFFEE_LOGGER
@@ -64,13 +64,13 @@ namespace Coffee.UIEffectInternal
#endif
public static void LogWarning(object tag, object message, Object context = null)
{
Log_Internal(LogType.Warning, tag, message, context ? context : tag as Object);
Log_Internal(LogType.Warning, tag, message, context != null ? context : tag as Object);
}
public static void LogError(object tag, object message, Object context = null)
{
#if ENABLE_COFFEE_LOGGER
Log_Internal(LogType.Error, tag, message, context ? context : tag as Object);
Log_Internal(LogType.Error, tag, message, context != null ? context : tag as Object);
#else
Debug.LogError($"{tag}: {message}", context);
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a2fa34e76bcd14489a1af18b393c3e65
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -13,7 +13,9 @@ namespace Coffee.UIEffectInternal
public static int count => s_Repository.count;
#if UNITY_EDITOR
public static Func<string, Shader> onShaderFind = Shader.Find;
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
public static void Clear()
{
@@ -48,7 +50,7 @@ namespace Coffee.UIEffectInternal
public static void Get(Hash128 hash, ref Material material, string shaderName)
{
Profiler.BeginSample("(COF)[MaterialRepository] Get");
s_Repository.Get(hash, ref material, x => new Material(Shader.Find(x))
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x))
{
hideFlags = HideFlags.DontSave | HideFlags.NotEditable
}, shaderName);
@@ -61,7 +63,7 @@ namespace Coffee.UIEffectInternal
public static void Get(Hash128 hash, ref Material material, string shaderName, string[] keywords)
{
Profiler.BeginSample("(COF)[MaterialRepository] Get");
s_Repository.Get(hash, ref material, x => new Material(Shader.Find(x.shaderName))
s_Repository.Get(hash, ref material, x => new Material(onShaderFind(x.shaderName))
{
hideFlags = HideFlags.DontSave | HideFlags.NotEditable,
shaderKeywords = x.keywords
+12 -15
View File
@@ -20,7 +20,9 @@ namespace Coffee.UIEffectInternal
{
public static T[] FindObjectsOfType<T>() where T : Object
{
#if UNITY_2023_1_OR_NEWER
#if UNITY_6000_4_OR_NEWER
return Object.FindObjectsByType<T>(FindObjectsInactive.Include);
#elif UNITY_2023_1_OR_NEWER
return Object.FindObjectsByType<T>(FindObjectsInactive.Include, FindObjectsSortMode.None);
#else
return Object.FindObjectsOfType<T>();
@@ -29,7 +31,7 @@ namespace Coffee.UIEffectInternal
public static void Destroy(Object obj)
{
if (!obj) return;
if (obj == null) return;
#if UNITY_EDITOR
if (!Application.isPlaying)
{
@@ -44,24 +46,19 @@ namespace Coffee.UIEffectInternal
public static void DestroyImmediate(Object obj)
{
if (!obj) return;
if (obj == null) return;
#if UNITY_EDITOR
if (Application.isEditor)
{
Object.DestroyImmediate(obj);
}
else
Object.DestroyImmediate(obj, true);
#else
Object.Destroy(obj);
#endif
{
Object.Destroy(obj);
}
}
[Conditional("UNITY_EDITOR")]
public static void SetDirty(Object obj)
{
#if UNITY_EDITOR
if (!obj) return;
if (obj == null) return;
EditorUtility.SetDirty(obj);
#endif
}
@@ -112,16 +109,16 @@ namespace Coffee.UIEffectInternal
{
if (Misc.isBatchOrBuilding) return;
var types = TypeCache.GetTypesWithAttribute<IconAttribute>();
var types = TypeCache.GetTypesWithAttribute(typeof(IconAttribute));
var scripts = MonoImporter.GetAllRuntimeMonoScripts();
foreach (var type in types)
{
var script = scripts.FirstOrDefault(x => x.GetClass() == type);
if (!script) continue;
if (script == null) continue;
var path = type.GetCustomAttribute<IconAttribute>()?._path;
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(path);
if (!icon) continue;
if (icon == null) continue;
s_SetIconForObject(script, icon);
}
@@ -34,7 +34,7 @@ namespace Coffee.UIEffectInternal
}
// If there are no instances in the pool, create a new one.
Logging.Log(this, $"A new instance is created (pooled: {_pool.CountInactive}, created: {_pool.CountAll}).");
Logger.Log(this, $"A new instance is created (pooled: {_pool.CountInactive}, created: {_pool.CountAll}).");
return _pool.Get();
}
@@ -47,7 +47,7 @@ namespace Coffee.UIEffectInternal
if (instance == null) return; // Ignore if already pooled or null.
_pool.Release(instance);
Logging.Log(this, $"An instance is released (pooled: {_pool.CountInactive}, created: {_pool.CountAll}).");
Logger.Log(this, $"An instance is released (pooled: {_pool.CountInactive}, created: {_pool.CountAll}).");
instance = default; // Set the reference to null.
}
#else
@@ -80,7 +80,7 @@ namespace Coffee.UIEffectInternal
}
// If there are no instances in the pool, create a new one.
Logging.Log(this, $"A new instance is created (pooled: {_pool.Count}, created: {++_count}).");
Logger.Log(this, $"A new instance is created (pooled: {_pool.Count}, created: {++_count}).");
return _onCreate();
}
@@ -94,7 +94,7 @@ namespace Coffee.UIEffectInternal
_onReturn(instance); // Return the instance to the pool.
_pool.Push(instance);
Logging.Log(this, $"An instance is released (pooled: {_pool.Count}, created: {_count}).");
Logger.Log(this, $"An instance is released (pooled: {_pool.Count}, created: {_count}).");
instance = default; // Set the reference to null.
}
#endif
@@ -90,7 +90,7 @@ namespace Coffee.UIEffectInternal
Profiler.BeginSample("(COF)[ObjectRepository] GetFromCache");
if (_cache.TryGetValue(hash, out var entry))
{
if (!entry.storedObject)
if (entry.storedObject == null)
{
Release(ref entry.storedObject);
Profiler.EndSample();
@@ -103,7 +103,7 @@ namespace Coffee.UIEffectInternal
Release(ref obj);
++entry.reference;
obj = entry.storedObject;
Logging.Log(_name, $"Get(total#{count}): {entry}");
Logger.Log(_name, $"Get(total#{count}): {entry}");
}
Profiler.EndSample();
@@ -116,7 +116,7 @@ namespace Coffee.UIEffectInternal
private void Add(Hash128 hash, ref T obj, T newObject)
{
if (!newObject)
if (newObject == null)
{
Release(ref obj);
obj = newObject;
@@ -130,8 +130,8 @@ namespace Coffee.UIEffectInternal
newEntry.hash = hash;
newEntry.reference = 1;
_cache[hash] = newEntry;
_objectKey[newObject.GetInstanceID()] = hash;
Logging.Log(_name, $"<color=#03c700>Add</color>(total#{count}): {newEntry}");
_objectKey[newObject.GetHashCode()] = hash;
Logger.Log(_name, $"<color=#03c700>Add</color>(total#{count}): {newEntry}");
Release(ref obj);
obj = newObject;
Profiler.EndSample();
@@ -146,23 +146,23 @@ namespace Coffee.UIEffectInternal
// Find and release the entry.
Profiler.BeginSample("(COF)[ObjectRepository] Release");
var id = obj.GetInstanceID();
var id = obj.GetHashCode();
if (_objectKey.TryGetValue(id, out var hash)
&& _cache.TryGetValue(hash, out var entry))
{
entry.reference--;
if (entry.reference <= 0 || !entry.storedObject)
if (entry.reference <= 0 || entry.storedObject == null)
{
Remove(entry);
}
else
{
Logging.Log(_name, $"Release(total#{_cache.Count}): {entry}");
Logger.Log(_name, $"Release(total#{_cache.Count}): {entry}");
}
}
else
{
Logging.Log(_name, $"Release(total#{_cache.Count}): <color=red>Already released: {obj}</color>");
Logger.Log(_name, $"Release(total#{_cache.Count}): <color=red>Already released: {obj}</color>");
}
obj = null;
@@ -175,10 +175,10 @@ namespace Coffee.UIEffectInternal
Profiler.BeginSample("(COF)[ObjectRepository] Remove");
_cache.Remove(entry.hash);
_objectKey.Remove(entry.storedObject.GetInstanceID());
_objectKey.Remove(entry.storedObject.GetHashCode());
_pool.Push(entry);
entry.reference = 0;
Logging.Log(_name, $"<color=#f29e03>Remove</color>(total#{_cache.Count}): {entry}");
Logger.Log(_name, $"<color=#f29e03>Remove</color>(total#{_cache.Count}): {entry}");
entry.Release(_onRelease);
Profiler.EndSample();
}
@@ -192,7 +192,7 @@ namespace Coffee.UIEffectInternal
public void Release(Action<T> onRelease)
{
reference = 0;
if (storedObject)
if (storedObject != null)
{
onRelease?.Invoke(storedObject);
}
@@ -1,5 +1,4 @@
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
@@ -23,6 +22,7 @@ namespace Coffee.UIEffectInternal
// Collect sample names.
s_Samples = samples;
s_SampleNames.Clear();
foreach (var (shaderName, sampleName, _) in samples)
{
s_SampleNames[shaderName] = sampleName;
@@ -107,7 +107,7 @@ namespace Coffee.UIEffectInternal
if (string.IsNullOrEmpty(shaderName)) return null;
var shader = Shader.Find(shaderName);
if (!shader) return null;
if (shader == null) return null;
var path = AssetDatabase.GetAssetPath(shader);
if (string.IsNullOrEmpty(path)) return null;
@@ -118,7 +118,7 @@ namespace Coffee.UIEffectInternal
private static void DeleteShader(string shaderName)
{
var shader = Shader.Find(shaderName);
if (shader)
if (shader != null)
{
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(shader));
}
@@ -156,12 +156,15 @@ namespace Coffee.UIEffectInternal
}
// Remove deprecated shaders.
foreach (var (guid, fileName) in s_DeprecatedShaders)
if (s_DeprecatedShaders != null)
{
var path = AssetDatabase.GUIDToAssetPath(guid);
if (!string.IsNullOrEmpty(path) && Path.GetFileName(path) == fileName)
foreach (var (guid, fileName) in s_DeprecatedShaders)
{
AssetDatabase.DeleteAsset(path);
var path = AssetDatabase.GUIDToAssetPath(guid);
if (!string.IsNullOrEmpty(path) && Path.GetFileName(path) == fileName)
{
AssetDatabase.DeleteAsset(path);
}
}
}
@@ -6,6 +6,7 @@ using UnityEngine.Profiling;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditorInternal;
@@ -16,7 +17,7 @@ using Object = UnityEngine.Object;
namespace Coffee.UIEffectInternal
{
[Serializable]
public class ShaderVariantRegistry
public sealed class ShaderVariantRegistry
{
[Serializable]
internal class StringPair : IEquatable<StringPair>
@@ -26,9 +27,7 @@ namespace Coffee.UIEffectInternal
public bool Equals(StringPair other)
{
if (other == null) return false;
if (ReferenceEquals(this, other)) return true;
return key == other.key && value == other.value;
return other != null && key == other.key && value == other.value;
}
public override bool Equals(object obj)
@@ -46,6 +45,7 @@ namespace Coffee.UIEffectInternal
}
private Dictionary<int, string> _cachedOptionalShaders = new Dictionary<int, string>();
private Dictionary<string, Shader> _shaderByName;
[SerializeField]
private List<StringPair> m_OptionalShaders = new List<StringPair>();
@@ -53,6 +53,9 @@ namespace Coffee.UIEffectInternal
[SerializeField]
internal ShaderVariantCollection m_Asset;
[SerializeField]
private List<Shader> m_RegisteredShaders = new List<Shader>();
#if UNITY_EDITOR
[SerializeField]
private bool m_ErrorOnUnregisteredVariant = false;
@@ -64,18 +67,64 @@ namespace Coffee.UIEffectInternal
public ShaderVariantCollection shaderVariantCollection => m_Asset;
public Func<string, bool> onShaderRequested;
/// <summary>
/// Build the runtime name-to-shader lookup from <see cref="m_RegisteredShaders"/>.
/// When shaders are delivered via AssetBundles (i.e. not in the player build),
/// <see cref="Shader.Find"/> cannot locate them by name. This lookup provides
/// direct references serialized at edit-time as a reliable alternative.
/// </summary>
public void InitializeShaderLookup()
{
var count = m_RegisteredShaders.Count;
if (count == 0) return;
if (_shaderByName == null)
{
_shaderByName = new Dictionary<string, Shader>(count);
}
else
{
_shaderByName.Clear();
}
for (var i = 0; i < count; i++)
{
var s = m_RegisteredShaders[i];
if (s != null)
{
_shaderByName[s.name] = s;
}
}
}
/// <summary>
/// Find a shader by name. Prefers the registered direct reference from
/// <see cref="m_RegisteredShaders"/> when available, falls back to
/// <see cref="Shader.Find"/> otherwise. This ensures correct behavior in both
/// built-in delivery (PreloadedAssets) and external delivery (AssetBundle) modes.
/// </summary>
public Shader FindShaderByName(string name)
{
if (_shaderByName != null && _shaderByName.TryGetValue(name, out var shader) && shader != null)
{
return shader;
}
return Shader.Find(name);
}
public Shader FindOptionalShader(Shader shader,
string requiredName,
string format,
string defaultOptionalShaderName)
{
if (!shader) return null;
if (shader == null) return null;
// Already cached.
var id = shader.GetInstanceID();
var id = shader.GetHashCode();
if (_cachedOptionalShaders.TryGetValue(id, out var optionalShaderName))
{
return Shader.Find(optionalShaderName);
return FindShaderByName(optionalShaderName);
}
// The shader has required name.
@@ -88,21 +137,21 @@ namespace Coffee.UIEffectInternal
// Find optional shader.
Shader optionalShader;
foreach (var pair in m_OptionalShaders)
var count = m_OptionalShaders.Count;
for (var i = 0; i < count; i++)
{
var pair = m_OptionalShaders[i];
if (pair.key != shaderName) continue;
optionalShader = Shader.Find(pair.value);
if (optionalShader)
{
_cachedOptionalShaders[id] = pair.value;
return optionalShader;
}
optionalShader = FindShaderByName(pair.value);
if (optionalShader == null) continue;
_cachedOptionalShaders[id] = pair.value;
return optionalShader;
}
// Find optional shader by format.
optionalShaderName = string.Format(format, shaderName);
optionalShader = Shader.Find(optionalShaderName);
if (optionalShader)
optionalShader = FindShaderByName(optionalShaderName);
if (optionalShader != null)
{
_cachedOptionalShaders[id] = optionalShaderName;
return optionalShader;
@@ -111,21 +160,26 @@ namespace Coffee.UIEffectInternal
#if UNITY_EDITOR
if (onShaderRequested?.Invoke(optionalShaderName) ?? false)
{
return Shader.Find(defaultOptionalShaderName);
return FindShaderByName(defaultOptionalShaderName);
}
#endif
// Find default optional shader.
_cachedOptionalShaders[id] = defaultOptionalShaderName;
return Shader.Find(defaultOptionalShaderName);
return FindShaderByName(defaultOptionalShaderName);
}
#if UNITY_EDITOR
private readonly HashSet<StringPair> _logVariants = new HashSet<StringPair>();
private readonly StringBuilder _sb = new StringBuilder(1024);
private readonly Dictionary<Hash128, (ShaderVariantCollection.ShaderVariant, StringPair)> _cachedVariants =
new Dictionary<Hash128, (ShaderVariantCollection.ShaderVariant, StringPair)>();
public void ClearCache()
{
_cachedOptionalShaders.Clear();
_cachedVariants.Clear();
}
/// <summary>
@@ -134,6 +188,7 @@ namespace Coffee.UIEffectInternal
/// </summary>
public void RegisterOptionalShaders(Object owner)
{
if (owner == null) return;
var shaderPaths = ShaderUtil.GetAllShaderInfo()
.Select(s => AssetDatabase.GetAssetPath(Shader.Find(s.name)))
.Where(path => !string.IsNullOrEmpty(path) && path.EndsWith(".shader"))
@@ -150,6 +205,7 @@ namespace Coffee.UIEffectInternal
/// </summary>
private void RegisterOptionalShaders(Object owner, string path)
{
if (owner == null) return;
if (!File.Exists(path) || !path.EndsWith(".shader")) return;
var packageName = PackageInfo.FindForAssembly(typeof(ShaderVariantRegistry).Assembly)?.name;
@@ -168,7 +224,7 @@ namespace Coffee.UIEffectInternal
{
// Find shader.
var shader = AssetDatabase.LoadAssetAtPath<Shader>(path);
if (!shader) return;
if (shader == null) return;
var shaderName = shader.name;
foreach (var key in keys)
@@ -182,14 +238,15 @@ namespace Coffee.UIEffectInternal
public void InitializeIfNeeded(Object owner)
{
if (owner == null) return;
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] InitializeIfNeeded");
if (!m_Asset && AssetDatabase.IsMainAsset(owner))
if (m_Asset == null && AssetDatabase.IsMainAsset(owner))
{
// Find ShaderVariantCollection in owner.
var path = AssetDatabase.GetAssetPath(owner);
var collection = AssetDatabase.LoadAssetAtPath<ShaderVariantCollection>(path);
if (collection)
if (collection != null)
{
m_Asset = collection;
}
@@ -204,30 +261,55 @@ namespace Coffee.UIEffectInternal
AssetDatabase.SaveAssets();
}
SyncRegisteredShaders(owner);
ClearCache();
Profiler.EndSample();
}
/// <summary>
/// Sync <see cref="m_RegisteredShaders"/> based on the current delivery mode.
/// When <see cref="PreloadedProjectSettings.excludeFromPreloadedAssetsWhenBuildPlayer"/> is enabled,
/// extracts shader references from the SVC so they can be resolved at runtime
/// without <see cref="Shader.Find"/>. Otherwise clears the list to avoid
/// stale references and unnecessary asset dependencies.
/// </summary>
private void SyncRegisteredShaders(Object owner)
{
if (owner == null) return;
if (m_Asset == null) return;
var so = new SerializedObject(m_Asset);
var shaders = so.FindProperty("m_Shaders");
// Get all shaders in the SVC, ignoring nulls and duplicates.
var shadersInSVC = Enumerable.Range(0, shaders.arraySize)
.Select(i =>
shaders.GetArrayElementAtIndex(i).FindPropertyRelative("first").objectReferenceValue as Shader)
.Where(s => s != null)
.Distinct()
.ToList();
// ShaderVariantCollection entry order is not stable between editor sessions.
// The registry is a lookup set, so an order-only difference is already in sync.
if (m_RegisteredShaders.Count == shadersInSVC.Count &&
new HashSet<Shader>(m_RegisteredShaders).SetEquals(shadersInSVC))
{
return;
}
m_RegisteredShaders.Clear();
m_RegisteredShaders.AddRange(shadersInSVC);
EditorUtility.SetDirty(owner);
}
internal void RegisterVariant(Material material, string path)
{
if (!material || !material.shader || !m_Asset) return;
if (material == null || material.shader == null || m_Asset == null) return;
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] RegisterVariant");
var shaderName = material.shader.name;
var validKeywords = material.shaderKeywords
.Where(x => !Regex.IsMatch(x, "(_EDITOR|EDITOR_)"))
.ToArray();
var keywords = string.Join(" ", validKeywords);
var variant = new ShaderVariantCollection.ShaderVariant
{
shader = material.shader,
keywords = validKeywords
};
// Already registered.
var pair = new StringPair() { key = shaderName, value = keywords };
var (variant, pair) = GetVariant(material);
if (m_Asset.Contains(variant))
{
// Already registered.
m_UnregisteredVariants.Remove(pair);
Profiler.EndSample();
return;
@@ -243,7 +325,8 @@ namespace Coffee.UIEffectInternal
if (_logVariants.Add(pair))
{
keywords = string.IsNullOrEmpty(keywords) ? "no keywords" : keywords;
var shaderName = pair.key;
var keywords = string.IsNullOrEmpty(pair.value) ? "no keywords" : pair.value;
Debug.LogError($"Shader variant '{shaderName} <{keywords}>' is not registered.\n" +
$"Register it in 'ProjectSettings > {path}' to use it in player.", m_Asset);
}
@@ -256,6 +339,55 @@ namespace Coffee.UIEffectInternal
m_UnregisteredVariants.Remove(pair);
Profiler.EndSample();
}
private (ShaderVariantCollection.ShaderVariant, StringPair) GetVariant(Material material)
{
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] GetVariant");
var shader = material.shader;
_sb.Length = 0;
foreach (var keyword in material.shaderKeywords)
{
// Ignore editor keyword.
if (keyword.Contains("_EDITOR") || keyword.Contains("EDITOR_")) continue;
_sb.Append(keyword);
_sb.Append(' ');
}
if (0 < _sb.Length)
{
_sb.Length--; // Remove last space.
}
var hash = new Hash128((uint)shader.GetHashCode(), (uint)GetContentsHashCode(_sb), 0, 0);
if (_cachedVariants.TryGetValue(hash, out var result))
{
Profiler.EndSample();
return result;
}
var pair = new StringPair() { key = shader.name, value = _sb.ToString() };
var variant = new ShaderVariantCollection.ShaderVariant
{
shader = shader,
keywords = pair.value.Split(' ')
};
_cachedVariants.Add(hash, (variant, pair));
Profiler.EndSample();
return (variant, pair);
}
private static int GetContentsHashCode(StringBuilder sb)
{
var hash = 17;
for (var i = 0; i < sb.Length; i++)
{
hash = unchecked(hash * 31 + sb[i]);
}
return hash;
}
#endif
}
@@ -274,7 +406,30 @@ namespace Coffee.UIEffectInternal
private bool _expandOptionalShaders;
private bool _expandUnregisteredVariants;
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName, Action onFindOptions)
public static ShaderVariantRegistryEditor CreateWithoutOption(SerializedObject so)
{
var property = so.FindProperty("m_ShaderVariantRegistry");
return new ShaderVariantRegistryEditor(property, null, null);
}
public static ShaderVariantRegistryEditor CreateWithoutOption(SerializedProperty property)
{
return new ShaderVariantRegistryEditor(property, null, null);
}
public static ShaderVariantRegistryEditor Create(SerializedObject so, string optionName, Action onFindOptions)
{
var property = so.FindProperty("m_ShaderVariantRegistry");
return new ShaderVariantRegistryEditor(property, optionName, onFindOptions);
}
public static ShaderVariantRegistryEditor Create(SerializedProperty property, string optionName,
Action onFindOptions)
{
return new ShaderVariantRegistryEditor(property, optionName, onFindOptions);
}
private ShaderVariantRegistryEditor(SerializedProperty property, string optionName, Action onFindOptions)
{
var so = property.serializedObject;
var optionalShaders = property.FindPropertyRelative("m_OptionalShaders");
@@ -282,6 +437,54 @@ namespace Coffee.UIEffectInternal
_errorOnUnregisteredVariant = property.FindPropertyRelative("m_ErrorOnUnregisteredVariant");
_asset = property.FindPropertyRelative("m_Asset");
_rlUnregisteredVariants = new ReorderableList(so, unregisteredVariants, false, true, false, true);
_rlUnregisteredVariants.drawHeaderCallback = rect =>
{
var rWarning = new Rect(rect.x, rect.y, 20, rect.height);
var icon = EditorGUIUtility.TrIconContent("warning",
"These variants are not registered.\nRegister them to use in player.");
EditorGUI.LabelField(rWarning, icon);
var rLabel = new Rect(rect.x + 20, rect.y, 200, rect.height);
EditorGUI.LabelField(rLabel, "Unregistered Shader Variants");
var rButton = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
{
unregisteredVariants.ClearArray();
}
};
_rlUnregisteredVariants.elementHeight = EditorGUIUtility.singleLineHeight * 2 + 4;
_rlUnregisteredVariants.drawElementCallback = (r, index, isActive, isFocused) =>
{
if (unregisteredVariants.arraySize <= index) return;
var element = unregisteredVariants.GetArrayElementAtIndex(index);
if (element == null) return;
var key = element.FindPropertyRelative("key");
var value = element.FindPropertyRelative("value");
var h = EditorGUIUtility.singleLineHeight;
var rKey = new Rect(r.x, r.y + 2, r.width, h);
EditorGUI.LabelField(rKey, key.stringValue, EditorStyles.popup);
var rValue = new Rect(r.x + 20, r.y + h + 5, r.width - 40, 14);
var keywords = string.IsNullOrEmpty(value.stringValue) ? "<no keywords>" : value.stringValue;
EditorGUI.TextField(rValue, GUIContent.none, keywords, "LODRenderersText");
var rButton = new Rect(r.x + r.width - 20, r.y + h + 4, 20, h);
if (GUI.Button(rButton, EditorGUIUtility.IconContent("icons/toolbar plus.png"), "iconbutton"))
{
var collection = _asset.objectReferenceValue as ShaderVariantCollection;
AddVariant(collection, key.stringValue, value.stringValue);
unregisteredVariants.DeleteArrayElementAtIndex(index);
}
};
// Optional shaders.
if (string.IsNullOrEmpty(optionName)) return;
_rlOptionalShaders = new ReorderableList(so, optionalShaders, true, true, true, true);
_rlOptionalShaders.drawHeaderCallback = rect =>
{
@@ -328,56 +531,15 @@ namespace Coffee.UIEffectInternal
ShowShaderDropdown(value);
}
};
_rlUnregisteredVariants = new ReorderableList(so, unregisteredVariants, false, true, false, true);
_rlUnregisteredVariants.drawHeaderCallback = rect =>
{
var rWarning = new Rect(rect.x, rect.y, 20, rect.height);
var icon = EditorGUIUtility.TrIconContent("warning",
"These variants are not registered.\nRegister them to use in player.");
EditorGUI.LabelField(rWarning, icon);
var rLabel = new Rect(rect.x + 20, rect.y, 200, rect.height);
EditorGUI.LabelField(rLabel, "Unregistered Shader Variants");
var rButton = new Rect(rect.x + rect.width - 60, rect.y, 60, rect.height - 4);
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
{
unregisteredVariants.ClearArray();
}
};
_rlUnregisteredVariants.elementHeight = EditorGUIUtility.singleLineHeight * 2 + 4;
_rlUnregisteredVariants.drawElementCallback = (r, index, isActive, isFocused) =>
{
if (unregisteredVariants.arraySize <= index) return;
var element = unregisteredVariants.GetArrayElementAtIndex(index);
if (element == null) return;
var key = element.FindPropertyRelative("key");
var value = element.FindPropertyRelative("value");
var h = EditorGUIUtility.singleLineHeight;
var rKey = new Rect(r.x, r.y + 2, r.width, h);
EditorGUI.LabelField(rKey, key.stringValue, EditorStyles.popup);
var rValue = new Rect(r.x + 20, r.y + h + 5, r.width - 40, 14);
var keywords = string.IsNullOrEmpty(value.stringValue) ? "<no keywords>" : value.stringValue;
EditorGUI.TextField(rValue, GUIContent.none, keywords, "LODRenderersText");
var rButton = new Rect(r.x + r.width - 20, r.y + h + 4, 20, h);
if (GUI.Button(rButton, EditorGUIUtility.IconContent("icons/toolbar plus.png"), "iconbutton"))
{
var collection = _asset.objectReferenceValue as ShaderVariantCollection;
AddVariant(collection, key.stringValue, value.stringValue);
unregisteredVariants.DeleteArrayElementAtIndex(index);
}
};
}
public void Draw()
{
DrawOptionalShaders(ref _expandOptionalShaders, _rlOptionalShaders);
if (_rlOptionalShaders != null)
{
DrawOptionalShaders(ref _expandOptionalShaders, _rlOptionalShaders);
}
DrawRegisteredShaderVariants(ref _expandUnregisteredVariants, _asset, ref _editor);
if (0 < _rlUnregisteredVariants.serializedProperty.arraySize)
{
@@ -386,10 +548,7 @@ namespace Coffee.UIEffectInternal
EditorGUILayout.Space(-20);
}
var labelWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 180;
EditorGUILayout.PropertyField(_errorOnUnregisteredVariant);
EditorGUIUtility.labelWidth = labelWidth;
}
private static void AddVariant(ShaderVariantCollection collection, string shaderName, string keywords)
@@ -397,7 +556,7 @@ namespace Coffee.UIEffectInternal
if (collection == null) return;
var shader = Shader.Find(shaderName);
if (!shader) return;
if (shader == null) return;
collection.Add(new ShaderVariantCollection.ShaderVariant
{
@@ -47,12 +47,12 @@ namespace Coffee.UIEffectInternal
private static bool HasChanged_Internal(this Transform self, Transform baseTransform, ref Matrix4x4 prev,
float epsilon)
{
if (!self) return false;
if (self == null) return false;
var hash = baseTransform ? baseTransform.GetHashCode() : 0;
var hash = baseTransform != null ? baseTransform.GetHashCode() : 0;
if (FrameCache.TryGet(self, nameof(HasChanged), hash, out bool result)) return result;
var matrix = baseTransform
var matrix = baseTransform != null
? baseTransform.worldToLocalMatrix * self.localToWorldMatrix
: self.localToWorldMatrix;
var current = matrix * Matrix4x4.Scale(Vector3.one * 10000);
@@ -1,4 +1,5 @@
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
@@ -17,12 +18,6 @@ namespace Coffee.UIEffectInternal
private static readonly FastAction s_OnScreenSizeChangedAction = new FastAction();
private static Vector2Int s_LastScreenSize;
static UIExtraCallbacks()
{
Canvas.willRenderCanvases += OnBeforeCanvasRebuild;
Logging.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor");
}
/// <summary>
/// Event that occurs after canvas rebuilds.
/// </summary>
@@ -67,20 +62,41 @@ namespace Coffee.UIEffectInternal
if (s_IsInitializedAfterCanvasRebuild) return;
s_IsInitializedAfterCanvasRebuild = true;
// Explicitly set `Canvas.willRenderCanvases += CanvasUpdateRegistry.PerformUpdate`.
CanvasUpdateRegistry.IsRebuildingLayout();
#if TMP_ENABLE
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
var _ = typeof(TMPro.TMP_UpdateManager)
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
.GetValue(null);
#endif
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
Canvas.willRenderCanvases += OnAfterCanvasRebuild;
Logging.LogMulticast(typeof(Canvas), "willRenderCanvases",
Logger.LogMulticast(typeof(Canvas), "willRenderCanvases",
message: "InitializeAfterCanvasRebuild");
}
#if UNITY_EDITOR
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
[InitializeOnLoadMethod]
#endif
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
#elif UNITY_EDITOR
[InitializeOnLoadMethod]
#else
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
private static void InitializeOnLoad()
{
#if UNITY_2019_4 || UNITY_2020_2_OR_NEWER
Canvas.preWillRenderCanvases -= OnBeforeCanvasRebuild;
Canvas.preWillRenderCanvases += OnBeforeCanvasRebuild;
#else
Canvas.willRenderCanvases -= OnBeforeCanvasRebuild;
Canvas.willRenderCanvases += OnBeforeCanvasRebuild;
#endif
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
s_IsInitializedAfterCanvasRebuild = false;
s_LastScreenSize = default;
Logger.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor");
}
/// <summary>
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3278a8b3cb92d4cc69862f0d45f150ad
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 014b76346c11643a89303ed3b5681733
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,44 @@
#if TIMELINE_ENABLE
using System;
using System.ComponentModel;
using UnityEngine;
namespace Coffee.UIEffects.Timeline
{
[DisplayName("Clip")]
public class UIEffectColorClip : UIEffectClip<UIEffectColorBehaviour>
{
}
[Serializable]
public class UIEffectColorBehaviour : UIEffectBehaviour, IGetValue<Color>
{
[ColorUsage(true, true)]
public Color m_Value = Color.white;
[ColorUsage(true, true)]
public Color m_From = Color.white;
public Color Get(float time)
{
return m_Tween
? Color.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
: m_Value;
}
}
public abstract class UIEffectColorMixerBehaviour : UIEffectMixerBehaviour<Color, UIEffectColorBehaviour>
{
protected override Color Add(Color baseValue, Color value, float weight)
{
return baseValue + value * weight;
}
protected override Color Lerp(Color defaultValue, Color value, float weight)
{
return Color.Lerp(defaultValue, value, weight);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c402544dc0be48afa6e9d3eb88120be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
#if TIMELINE_ENABLE
using System;
using System.ComponentModel;
using UnityEngine;
namespace Coffee.UIEffects.Timeline
{
[DisplayName("Clip")]
public class UIEffectFloatClip : UIEffectClip<UIEffectFloatBehaviour>
{
}
[Serializable]
public class UIEffectFloatBehaviour : UIEffectBehaviour, IGetValue<float>
{
public float m_Value = 1;
public float m_From = 1;
public float Get(float time)
{
return m_Tween
? Mathf.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
: m_Value;
}
}
public abstract class UIEffectFloatMixerBehaviour : UIEffectMixerBehaviour<float, UIEffectFloatBehaviour>
{
protected override float Add(float baseValue, float value, float weight)
{
return baseValue + value * weight;
}
protected override float Lerp(float defaultValue, float value, float weight)
{
return Mathf.Lerp(defaultValue, value, weight);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ffaa25511fc8148839e36bda4414e944
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,177 @@
#if TIMELINE_ENABLE
using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
namespace Coffee.UIEffects.Timeline
{
[AttributeUsage(AttributeTargets.Class)]
public class FloatClipUsageAttribute : PropertyAttribute
{
public readonly float min;
public readonly float max;
public readonly float defaultValue;
public FloatClipUsageAttribute(float min, float max, float defaultValue = 0f)
{
this.min = min;
this.max = max;
this.defaultValue = defaultValue;
}
}
[AttributeUsage(AttributeTargets.Class)]
public class ColorClipUsageAttribute : PropertyAttribute
{
public readonly bool alpha;
public ColorClipUsageAttribute(bool alpha)
{
this.alpha = alpha;
}
}
public interface IGetValue<out T>
{
T Get(float time);
}
[TrackColor(0.92f, 0.54f, 0.17f)]
[TrackBindingType(typeof(UIEffect), TrackBindingFlags.AllowCreateComponent)]
public abstract class UIEffectTrack<T> : TrackAsset
where T : PlayableBehaviour, new()
{
protected abstract string fieldName { get; }
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
var playable = ScriptPlayable<T>.Create(graph, inputCount);
foreach (var timelineClip in GetClips())
{
if (timelineClip.asset is UIEffectClip clip)
{
clip.timelineClip = timelineClip;
}
}
return playable;
}
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver)
{
var trackBinding = director.GetGenericBinding(this) as UIEffect;
if (trackBinding == null) return;
driver.AddFromName<UIEffect>(trackBinding.gameObject, fieldName);
base.GatherProperties(director, driver);
}
}
public abstract class UIEffectClip : PlayableAsset, ITimelineClipAsset
{
public TimelineClip timelineClip { get; set; }
public ClipCaps clipCaps => ClipCaps.Blending | ClipCaps.Extrapolation;
private void OnValidate()
{
}
}
public abstract class UIEffectClip<T> : UIEffectClip
where T : UIEffectBehaviour, new()
{
[NotKeyable]
[SerializeField]
public T m_Data = new T();
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
var playable = ScriptPlayable<T>.Create(graph, m_Data);
var behaviour = playable.GetBehaviour();
behaviour.clip = this;
return playable;
}
}
[Serializable]
public abstract class UIEffectBehaviour : PlayableBehaviour
{
public bool m_Tween;
public AnimationCurve m_Curve = AnimationCurve.Linear(0, 0, 1, 1);
public UIEffectClip clip { get; set; }
}
public abstract class UIEffectMixerBehaviour<T, TBehavior> : PlayableBehaviour
where TBehavior : UIEffectBehaviour, IGetValue<T>, new()
{
private T _defaultValue;
protected abstract T currentValue { get; set; }
protected UIEffect effect { get; private set; }
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
{
InitializeIfNeeded(playerData as UIEffect);
if (effect == null) return;
var inputCount = playable.GetInputCount();
var value = default(T);
var totalWeight = GetTotalWeight(playable);
for (var i = 0; i < inputCount; i++)
{
var weight = playable.GetInputWeight(i);
if (weight <= 0) continue;
var playableInput = (ScriptPlayable<TBehavior>)playable.GetInput(i);
var input = playableInput.GetBehaviour();
var normalizedTime = (float)(playableInput.GetTime() / input.clip.timelineClip.duration);
value = Add(value, input.Get(normalizedTime), weight / totalWeight);
totalWeight += weight;
}
currentValue = Lerp(_defaultValue, value, totalWeight);
}
public override void OnPlayableDestroy(Playable playable)
{
if (effect != null)
{
currentValue = _defaultValue;
}
}
private static float GetTotalWeight(Playable playable)
{
var totalWeight = 0f;
var inputCount = playable.GetInputCount();
for (var i = 0; i < inputCount; i++)
{
totalWeight += playable.GetInputWeight(i);
}
return totalWeight;
}
private void InitializeIfNeeded(UIEffect newEffect)
{
if (effect == newEffect) return;
if (effect != null)
{
currentValue = _defaultValue;
}
effect = newEffect;
_defaultValue = newEffect != null ? currentValue : default;
}
protected abstract T Add(T current, T value, float weight);
protected abstract T Lerp(T defaultValue, T value, float weight);
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a54d6ecf5bae485db4b0df376bebc35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Color Intensity Track")]
public class ColorIntensityTrack : UIEffectTrack<ColorIntensityMixer>
{
protected override string fieldName => "m_ColorIntensity";
}
public class ColorIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.colorIntensity;
set => effect.colorIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66d61d709d31c4220bc59365f78584ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(false)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Color Track")]
public class ColorTrack : UIEffectTrack<ColorMixer>
{
protected override string fieldName => "m_Color";
}
public class ColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.color;
set => effect.color = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: edfa6dc975b3446d8bc2cf6ca1fdd40f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(true)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Detail Color Track")]
public class DetailColorTrack : UIEffectTrack<DetailColorMixer>
{
protected override string fieldName => "m_DetailColor";
}
public class DetailColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.detailColor;
set => effect.detailColor = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88051c9178d704e47a12db836b6343c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Detail Intensity Track")]
public class DetailIntensityTrack : UIEffectTrack<DetailIntensityMixer>
{
protected override string fieldName => "m_DetailIntensity";
}
public class DetailIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.detailIntensity;
set => effect.detailIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e901a5dfc37104d2182dcc49fe370305
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(true)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Detail Color Track")]
public class EdgeColorTrack : UIEffectTrack<EdgeColorMixer>
{
protected override string fieldName => "m_EdgeColor";
}
public class EdgeColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.edgeColor;
set => effect.edgeColor = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f78a05c2255e94329a1b7bd465ac8f8a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Edge Shiny Rate Track")]
public class EdgeShinyRateTrack : UIEffectTrack<EdgeShinyRateMixer>
{
protected override string fieldName => "m_EdgeShinyRate";
}
public class EdgeShinyRateMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.edgeShinyRate;
set => effect.edgeShinyRate = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 118c294bc3dfa4e7a96de50b410ad846
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Intensity Track")]
public class GradationIntensityTrack : UIEffectTrack<GradationIntensityMixer>
{
protected override string fieldName => "m_GradationIntensity";
}
public class GradationIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationIntensity;
set => effect.gradationIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7b4c7c51d8c8c4d9ebfacb4ec8e7f73e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,24 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Offset Track")]
public class GradationOffsetTrack : UIEffectTrack<GradationOffsetMixer>
{
protected override string fieldName => "m_GradationOffset";
}
public class GradationOffsetMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationOffset;
set => effect.gradationOffset = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: deb67c01293914e41a70a7570c3a539e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More