Compare commits

...

17 Commits
3.0.0 ... 3.2.0

Author SHA1 Message Date
semantic-release-bot
6884c62687 chore(release): 3.2.0 [skip ci]
# [3.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.1.1...3.2.0) (2020-11-15)

### Features

* compatibility with other IMaterialModifier ([08273cb](08273cb0c3)), closes [#115](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/115)
2020-11-15 18:08:38 +00:00
mob-sakai
fc4bd708fd refactor: refactor 2020-11-16 03:07:35 +09:00
mob-sakai
08273cb0c3 feat: compatibility with other IMaterialModifier
Close #115
2020-11-16 03:07:24 +09:00
semantic-release-bot
06d8fae58f chore(release): 3.1.1 [skip ci]
## [3.1.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.1.0...3.1.1) (2020-11-09)

### Bug Fixes

* error on build in Unity 2019.3.11-15 ([68669c7](68669c7396)), closes [#114](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/114)
* null Reference when creating New Scene after Prefab was open in PrefabMode ([22bcecd](22bcecd0ab)), closes [#111](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/111)
2020-11-09 16:52:34 +00:00
mob-sakai
22bcecd0ab fix: null Reference when creating New Scene after Prefab was open in PrefabMode
Close #111
2020-11-10 01:51:24 +09:00
mob-sakai
68669c7396 fix: error on build in Unity 2019.3.11-15
Close #114
2020-11-10 01:44:24 +09:00
mob-sakai
1b1ca56461 docs: update readme 2020-10-29 02:13:45 +09:00
semantic-release-bot
b322db3ca9 chore(release): 3.1.0 [skip ci]
# [3.1.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.0.1...3.1.0) (2020-10-28)

### Bug Fixes

* compile error in 2018.2 ([82f81ef](82f81efd7e))

### Features

* maskable option to ignore masking ([af5f7e9](af5f7e90b0)), closes [#109](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/109)
2020-10-28 17:05:39 +00:00
mob-sakai
44beab0de8 test: update test workflow 2020-10-29 01:57:17 +09:00
mob-sakai
82f81efd7e fix: compile error in 2018.2 2020-10-29 01:57:17 +09:00
mob-sakai
af5f7e90b0 feat: maskable option to ignore masking
Close #109
2020-10-28 22:19:15 +09:00
mob-sakai
3d8f11ba82 docs: add warning for the obsolete tags and branches 2020-10-28 13:13:11 +09:00
semantic-release-bot
61f7706259 chore(release): 3.0.1 [skip ci]
## [3.0.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.0.0...3.0.1) (2020-10-28)

### Bug Fixes

* fix the sorting algorithm ([7acbf22](7acbf22b4d))
* in rare cases, an IndexOutOfRangeException is thrown ([f7eac0a](f7eac0a34f))
2020-10-28 03:34:59 +00:00
mob-sakai
c4c35a6611 refactor: update release workflow 2020-10-28 12:23:35 +09:00
mob-sakai
7acbf22b4d fix: fix the sorting algorithm 2020-10-28 12:21:34 +09:00
mob-sakai
f7eac0a34f fix: in rare cases, an IndexOutOfRangeException is thrown 2020-10-28 12:18:39 +09:00
mob-sakai
f2c78e3ae4 docs: update changelog 2020-10-28 03:54:12 +09:00
9 changed files with 211 additions and 98 deletions

View File

@@ -21,7 +21,3 @@ jobs:
npx semantic-release -e @mob-sakai/semantic-release-upm
env:
GITHUB_TOKEN: ${{ github.token }}
- run: cat package.json
- run: ls

View File

@@ -1,5 +1,3 @@
# Secrets
# ULF_REPO: Git repository url contains ulf files. https://mob-sakai:{{token}}@github.com/mob-sakai/ulfs.git
name: unity-test
on:
@@ -14,33 +12,20 @@ on:
- synchronize
jobs:
release-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm i --no-save https://gist.github.com/mob-sakai/c90044338361af97a7e8c8a78425bdb3
npx semantic-release -e @mob-sakai/semantic-release-upm --dry-run --debug --branches develop
env:
GITHUB_TOKEN: ${{ github.token }}
- run: cat package.json
- run: ls
unity-test:
strategy:
fail-fast: false
matrix:
unity:
[
"2018.3.14f1",
"2018.4.25f1",
"2019.4.10f1",
"2019.1.14f1",
"2019.2.11f1",
"2019.3.15f1",
"2019.4.8f1",
"2020.1.5f1",
]
env:
RUN_UNITY: "xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath ."
runs-on: ubuntu-latest
container:
@@ -52,41 +37,13 @@ jobs:
- name: Activate Unity Editor
id: activation
run: |
# Clone ulfs.
apt-get update
apt-get install software-properties-common -y
apt-add-repository ppa:git-core/ppa -y
apt-get update
apt-get install git -y
git clone --depth 1 ${ULF_REPO} .ulfs
# Activate with ulf.
ULF_FILE=.ulfs/Unity_v${UNITY_VERSION}.ulf
echo $ULF_FILE
if [ -e ${ULF_FILE} ]; then
/opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile ${ULF_FILE} \
| grep -E 'LICENSE SYSTEM.*\w{32} != \w{32}' && FAILED=true
else
echo "::error:: ulf file '${ULF_FILE}' is not found."
FAILED=true
fi
# Activation failed.
if [ $FAILED ]; then
echo "::error:: the unity activation may have failed. manual activation is required.%0A \
1. download the artifact's .alf file.%0A \
2. Go to https://license.unity3d.com/manual to activate manually.%0A \
3. Generate a .ulf file from the .alf file and download it.%0A \
4. Rename .ulf to 'Unity_v${UNITY_VERSION}.ulf'.%0A \
5. Add file to ulfs repository.%0A \
5. Re-run the jobs."
/opt/Unity/Editor/Unity -quit -batchmode -nographics -logFile -createManualActivationFile
exit 1
fi
env:
ULF_REPO: ${{ secrets.ULF_REPO }}
UNITY_VERSION: ${{ matrix.unity }}
apt-get update > /dev/null
apt-get install software-properties-common -y > /dev/null
apt-add-repository ppa:git-core/ppa -y > /dev/null
apt-get update > /dev/null
apt-get install git -y > /dev/null
git clone https://gist.github.com/135c940b45ec4e385861c8711777db7f.git .ulfs
chmod 755 .ulfs/activate.sh && .ulfs/activate.sh ${{ matrix.unity }}
# (On failed activation) Upload unity activation file
- name: Upload unity activation file
@@ -96,40 +53,46 @@ jobs:
name: Unity_v${{ matrix.unity }}.alf
path: ./*.alf
# Setup testspace
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{ github.repository_owner }}
# Checkout sandbox project
- uses: actions/checkout@v2
with:
ref: "sandbox"
submodules: "true"
fetch-depth: "1"
# Update package submodule
- name: "Update package submodule"
working-directory: Packages/dev
run: git checkout ${{ github.head_ref }}
# Install codecoverage package
- name: "Install codecoverage package"
if: always() && steps.activation.conclusion == 'success'
run: |
[ -n "`echo ${{ matrix.unity }} | grep -e '\(2017.\|2018.\|2019.1.\|2019.2.\)'`" ] && exit 0
npm i -g openupm-cli
openupm add com.unity.testtools.codecoverage
# Run playmode tests
- name: "Run playmode tests"
if: always() && steps.activation.conclusion == 'success'
run: |
# Install codecoverage
if [ -z "`echo ${{ matrix.unity }} | grep 2018.`" ]; then
npm i -g openupm-cli
openupm add com.unity.testtools.codecoverage
fi
$RUN_UNITY -runTests -testPlatform playmode -enableCodeCoverage || exit 0
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . \
-runTests -testPlatform playmode -enableCodeCoverage
# Run editmode tests
- name: "Run editmode tests"
if: always() && steps.activation.conclusion == 'success'
run: |
$RUN_UNITY -runTests -testPlatform editmode -enableCodeCoverage || exit 0
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . \
-runTests -testPlatform editmode -enableCodeCoverage
# Setup testspace
- uses: testspace-com/setup-testspace@v1
if: always() && steps.activation.conclusion == 'success'
with:
domain: ${{ github.repository_owner }}
# Push test results
- name: Push test results

View File

@@ -1,10 +1,85 @@
# [3.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.1.1...3.2.0) (2020-11-15)
### Features
* compatibility with other IMaterialModifier ([08273cb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/08273cb0c340ccb4f35120dc804c37d758da9ce1)), closes [#115](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/115)
## [3.1.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.1.0...3.1.1) (2020-11-09)
### Bug Fixes
* error on build in Unity 2019.3.11-15 ([68669c7](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/68669c739676f2354db4913a0e2296ab1715ee1f)), closes [#114](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/114)
* null Reference when creating New Scene after Prefab was open in PrefabMode ([22bcecd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/22bcecd0abd6ad651fcf066e5c9efe9a43fd217a)), closes [#111](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/111)
# [3.1.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.0.1...3.1.0) (2020-10-28)
### Bug Fixes
* compile error in 2018.2 ([82f81ef](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/82f81efd7e4ea06465e24f44f96d9726a1a60cc8))
### Features
* maskable option to ignore masking ([af5f7e9](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/af5f7e90b0570d5c7fcf045fd6b81036a060e493)), closes [#109](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/109)
## [3.0.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.0.0...3.0.1) (2020-10-28)
### Bug Fixes
* fix the sorting algorithm ([7acbf22](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7acbf22b4de7c3b5251fbb720bb5b575946622f6))
* in rare cases, an IndexOutOfRangeException is thrown ([f7eac0a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f7eac0a34f07767dc04e035f97179cc30935284f))
# [3.0.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/2.3.0...3.0.0) (2020-10-27)
### Bug Fixes
* IgnoreCanvasScaler may be enabled unintentionally ([d9f9244](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d9f9244e49127bea405c3cb802b588c1eae00831))
* update release workflow ([37ff06d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/37ff06dd122365a36611cbf53700d5df99d126ad))
* an error happens during loading scene in editor ([ab9d9aa](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ab9d9aa7b3afcdbdda00004f7af3fd4827aaea54)), closes [#101](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/101)
* not working as expected in world simulation space ([683fcb4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/683fcb4ecdf8bfa0994571f5d6c3dd2bc242ca2a)), closes [#98](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/98)
* if the package was installed via openupm, an unintended directory 'Samples' was included ([1913de5](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/1913de557743b9480f72c5378d13c284a4ac93f9))
* animatable properties not working ([5b8b0bd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/5b8b0bd28b251a7ea6e0cfa0c4b69bd7f9c4d953)), closes [#95](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/95)
* combine Instances error ([878f812](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/878f81202ac29a8a20f174efa916da64eef99e8a)), closes [#91](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/91)
* in rare cases, the particle size is incorrect with camera-space mode ([90593ac](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/90593ac021ce19d164927e44804354535db047bb)), closes [#93](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/93)
* trails material uses sprite texture ([9e65ee7](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/9e65ee7345e16b5124e94d26f5749999c648f677)), closes [#92](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/92)
* ignore missing object on initialize ([8bd9b62](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8bd9b621b9efcd242c410405d066494a1d53f9a3))
* not masked ([4ef5947](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4ef5947baa325002aecd1ccbdc75056a6567f14b))
* in Unity 2018.2, PrefabStageUtility is not found ([0b6dcff](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0b6dcff5d6356db497532daa0a26804852e8de24))
* removed UIParticle will be saved in prefab mode ([08e2d51](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/08e2d51c73a294d44974e7fba35e2477f04e6860))
* hide camera for baking ([30b4703](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/30b4703e2a1746efc4b7db154354f80fd0593b98))
* In ignore canvas scaler mode, Transform.localScale is zero ([cc71f2b](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/cc71f2bdac1a61fd5e5fc85d0a69589e05a0f79d)), closes [#89](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/89)
* In prefab mode, an error occurs ([a222f37](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a222f3710b530c7fc9fab10f25bd28d820ffebe2)), closes [#88](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/88)
* the default value of IgnoreCanvasScaler is true ([966fae1](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/966fae1d22a98259ec5aff68b4603b7c21dfdfc9))
* build fails ([ac080a4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ac080a44e4d872bc3f784fc222cc74aac7e795e9)), closes [#85](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/85)
* if in the mask, rendering material will be destroyed ([0db40cf](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0db40cf160b2a5a27c83ef15d648b2771a47b51a))
* baking camera settings for camera space ([436c5e4](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/436c5e47f75c3e167dcd77c188847e9d7d6ea68d))
* fix local simulation ([7add9de](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7add9defb70be29ddbe536d854591c2e0d9e83fa))
* fix camera for baking mesh ([6395a4f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/6395a4fa744a46551593185711d6545a94d8b456))
* The type or namespace name 'U2D' does not exist in the namespace 'UnityEditor.Experimental' in Unity 2019.3 or later ([930199e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/930199e5e42920825b27d5bf3e2b2a4bda77fa14)), closes [#82](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/82)
* texture sheet animation module Sprite mode not working ([30d1d5d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/30d1d5d3cc67234a8cd985e98f181aff2a8bd8ef)), closes [#79](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/79)
* An exception in the OnSceneGUI caused the scale of the transformation to change unintentionally ([75413e0](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/75413e0e2cff42a85b73b33e17e0bb6344ecc8f6))
* read-only properties in the inspector ([f012b23](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f012b238d97aad3fdc3107b1f9a197de869c43e6))
* Added CanvasRenderer as a required component ([a8950f6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a8950f65c817be04b0be222c9728c716fdd7c658))
* If sprite is null, a null exception is thrown ([50c6e98](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/50c6e980ca37dda1bece5252162fa05ca3472ee8))
* fix displayed version in readme ([c29bbdd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c29bbddf8ad9a251d5f472b77cf85b3d432bba71))
* abnormal Mesh Bounds with Particle Trails ([518a749](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/518a7497105a114a0f6b1782df0c35ba0aecfab2)), closes [#61](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/61)
* multiple UIParticleOverlayCamera in scene ([3f09395](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3f093958b3353463d6c5bd29ef3338203d4e41d7)), closes [#73](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/73)
* add package keywords ([49d8f3f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/49d8f3fe4c76cf6bd2cd5b6134ee23134532da8e))
* particles not visible if scale.z is 0 ([35718e0](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/35718e099acbb04fdadf131c7e4d2e6c3f4a1756)), closes [#64](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/64)
* remove unnecessary scripts ([0a43740](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0a4374099dc3151e7f1a3a24a6ce6c39a968e163))
* workaround for [#70](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/70) ([4bbcc33](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4bbcc334abb7cd6db2897fad0bda219d5ea73530))
* change the text in the inspector to make it more understandable. ([7ca0b6f](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/7ca0b6fa34c1168ef103992e1c69b68631b3bc60)), closes [#66](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/66)
* editor crashes when mesh is set to null when ParticleSystem.RenderMode=Mesh ([e5ebadd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e5ebadd84731716f82c63ac5ba3eb676720e3ad6)), closes [#69](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/69)
* getting massive errors on editor ([ef82fa8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ef82fa82a69894e643f0d257f99eb9177785f697)), closes [#67](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/67)
* heavy editor UI ([d3b470a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d3b470a2be3a21add9e126b357e46bdfaa6f16c8))
* remove a menu to add overlay camera ([f5d3b6e](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f5d3b6edb5687c4d465992ef5c3c0d54f7b36d74))
* rotating the particle rect may cause out of bounds ([3439842](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3439842119f334b50910c0a983e561944cc792a2)), closes [#55](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/55)
* scale will be decrease on editor ([0c59846](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0c59846f11438b12caad04ae5d5b544a28883ea6))
* UI darker than normal when change to linear color space ([db4d8a7](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/db4d8a742ca36c8dd2de6936b9cf2912c72d4b9f)), closes [#57](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/57)
### Features
@@ -12,11 +87,34 @@
* cache modified material ([6b397f3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/6b397f39b89f40c4aae9c9f56706b3bc68a376be)), closes [#94](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/94)
* improve the material batching ([4be5666](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4be56669fb764bf61c0246a6e56d18640053b565))
* un-limit on the number of mesh instances ([f133881](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f1338813ca85d305f334799b78154e03b0aff60c))
* refresh children ParticleSystem with a gameObjects as root ([8bae1d0](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8bae1d08cc6f00e2b8d6f336aad92233891da1e4))
* add API to bind ParticleSystem object ([a77bbd3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a77bbd3a9a65d5fd1198bd8e580982ca8e07fca8))
* material batching ([8f703e6](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8f703e6d2c0e8229ca14b25638dae5d91a5658c3))
* support AnimatableProperty for multiple materials ([062d988](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/062d9887fb8b096250ec3b43d9aa82637940a8bb))
* remove menu in inspector ([e7f8f51](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e7f8f512122a01423de415b55e3190d62bda146a))
* add menu to create UIParticle ([2fa1843](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/2fa18431f0c8c4aeadfdd1cb98eeeef5ac6970a0))
* add play/pause/stop api ([f09a386](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f09a386bc59fbab8143f7f0b814c8684aea7f27c))
* support for changing rendering orders ([745d4a5](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/745d4a598846b3e77d1071433079fdd5140921a8))
* Support for child ParticleSystem rendering ([4ee90be](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/4ee90be17c68bf405f81f432615a3eebaa022366))
* UIParticle for trail is no longer needed ([466e43c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/466e43cf931d211907419f804a90776a0d9f4906))
* add menu to create UIParticle ([14f1c78](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/14f1c782ff0f2b67d85d7c9ad0cf662da1dd1fc6))
* Combine baked meshes to improve performance ([633d058](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/633d058756fde776a7e5192a0f023adf6eb0ca7b))
* improve performance ([77c056a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/77c056ad5f2918efe457883f3b0361f952600568))
* optimization for vertices transforms and adding node for trails ([e070e8d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/e070e8d5ee205c25a1e3be5d3178821d4a8265d0)), closes [#75](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/75)
* option to ignoring canvas scaling ([fe85fed](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/fe85fed3c0ad2881578ff68722863d65dfa4db7a))
* support 3d scaling ([42a84bc](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/42a84bc5e130aed3cf5e57dcd6a9d8dc94deb641))
* support custom simulation space ([a83e647](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/a83e64761c008e88ff328a2609118806e97f19cf)), closes [#78](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/78)
* support for particle systems including trail only ([f389d39](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f389d39953c85b97482b12d1c8578ecaeddacd18)), closes [#61](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/61)
* add support for SpriteAtlas ([b31e325](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b31e325bb1ef0856cb1ac4c4b0c4da0f1578b8ba))
* add menu to import sample ([b8b1827](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b8b18273185769235101da01f5bbadbac188e387))
### BREAKING CHANGES
* The development branch name has been changed. Most cases are unaffected.
* The child UIParticle is no longer needed.
* The bake-task has changed significantly. It may look different from previous versions.
* update develop environment to Unity 2018.3. Unity 2018.2 will continue to be supported.
# [3.0.0-preview.38](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.37...v3.0.0-preview.38) (2020-10-04)

View File

@@ -1,6 +1,8 @@
Particle Effect For UGUI (UI Particle)
===
**:warning: NOTE: Do not use [the obsolete tags and branches](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/108) to reference the package. They will be removed in near future. :warning:**
This plugin provide a component to render particle effect for uGUI in Unity 2018.2 or later.
The particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.
@@ -58,7 +60,7 @@ Compares this "Baking mesh" approach with the conventional approach:
## Demo
* [WebGL Demo](http://mob-sakai.github.io/ParticleEffectForUGUI)
* [WebGL Demo](https://mob-sakai.github.io/Demos/ParticleEffectForUGUI)
* [WebGL Demo (Cartoon FX & War FX)](https://mob-sakai.github.io/Demos/ParticleEffectForUGUI_CFX)
* [Cartoon FX Free][CFX] & [War FX][WFX] (by [Jean Moreno (JMO)][JMO]) with UIParticle

View File

@@ -25,6 +25,7 @@ namespace Coffee.UIExtensions
private static readonly List<UIParticle> s_TempParents = new List<UIParticle>();
private static readonly List<UIParticle> s_TempChildren = new List<UIParticle>();
private SerializedProperty _spMaskable;
private SerializedProperty _spScale;
private SerializedProperty _spIgnoreCanvasScaler;
private SerializedProperty _spAnimatableProperties;
@@ -52,6 +53,7 @@ namespace Coffee.UIExtensions
protected override void OnEnable()
{
base.OnEnable();
_spMaskable = serializedObject.FindProperty("m_Maskable");
_spScale = serializedObject.FindProperty("m_Scale3D");
_spIgnoreCanvasScaler = serializedObject.FindProperty("m_IgnoreCanvasScaler");
_spAnimatableProperties = serializedObject.FindProperty("m_AnimatableProperties");
@@ -87,11 +89,11 @@ namespace Coffee.UIExtensions
{
EditorGUI.LabelField(new Rect(rect.x, rect.y, 150, rect.height), s_ContentRenderingOrder);
#if UNITY_2019_3_OR_NEWER
#if UNITY_2019_3_OR_NEWER
rect = new Rect(rect.width - 55, rect.y, 80, rect.height);
#else
#else
rect = new Rect(rect.width - 55, rect.y - 1, 80, rect.height);
#endif
#endif
if (GUI.Button(rect, s_ContentRefresh, EditorStyles.miniButton))
{
@@ -127,6 +129,9 @@ namespace Coffee.UIExtensions
serializedObject.Update();
// Maskable
EditorGUILayout.PropertyField(_spMaskable);
// IgnoreCanvasScaler
using (var ccs = new EditorGUI.ChangeCheckScope())
{

View File

@@ -1,3 +1,6 @@
#if UNITY_2019_3_11 || UNITY_2019_3_12 || UNITY_2019_3_13 || UNITY_2019_3_14 || UNITY_2019_3_15 || UNITY_2019_4_OR_NEWER
#define SERIALIZE_FIELD_MASKABLE
#endif
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Coffee.UIParticleExtensions;
@@ -38,6 +41,10 @@ namespace Coffee.UIExtensions
[Tooltip("Particles")] [SerializeField]
private List<ParticleSystem> m_Particles = new List<ParticleSystem>();
#if !SERIALIZE_FIELD_MASKABLE
[SerializeField] private bool m_Maskable = true;
#endif
private bool _shouldBeRemoved;
private DrivenRectTransformTracker _tracker;
private Mesh _bakedMesh;
@@ -49,6 +56,7 @@ namespace Coffee.UIExtensions
private static MaterialPropertyBlock s_Mpb;
private static readonly List<Material> s_PrevMaskMaterials = new List<Material>();
private static readonly List<Material> s_PrevModifiedMaterials = new List<Material>();
private static readonly List<Component> s_Components = new List<Component>();
/// <summary>
@@ -116,6 +124,11 @@ namespace Coffee.UIExtensions
get { return _modifiedMaterials; }
}
public override Material materialForRendering
{
get { return canvasRenderer.GetMaterial(0); }
}
public List<bool> activeMeshIndices
{
get { return _activeMeshIndices; }
@@ -242,6 +255,7 @@ namespace Coffee.UIExtensions
}
//
GetComponents(typeof(IMaterialModifier), s_Components);
var materialCount = Mathf.Max(8, count);
canvasRenderer.materialCount = materialCount;
var j = 0;
@@ -256,9 +270,12 @@ namespace Coffee.UIExtensions
// Main
var index = i * 2;
if (activeMeshIndices.Count <= index) break;
if (activeMeshIndices[index] && 0 < s_TempMaterials.Count)
{
var mat = GetModifiedMaterial(s_TempMaterials[0], ps.GetTextureForSprite());
for (var k = 1; k < s_Components.Count; k++)
mat = (s_Components[k] as IMaterialModifier).GetModifiedMaterial(mat);
canvasRenderer.SetMaterial(mat, j);
UpdateMaterialProperties(r, j);
j++;
@@ -266,10 +283,12 @@ namespace Coffee.UIExtensions
// Trails
index++;
if (materialCount <= j) break;
if (activeMeshIndices.Count <= index || materialCount <= j) break;
if (activeMeshIndices[index] && 1 < s_TempMaterials.Count)
{
var mat = GetModifiedMaterial(s_TempMaterials[1], null);
for (var k = 1; k < s_Components.Count; k++)
mat = (s_Components[k] as IMaterialModifier).GetModifiedMaterial(mat);
canvasRenderer.SetMaterial(mat, j++);
}
}
@@ -349,6 +368,9 @@ namespace Coffee.UIExtensions
/// </summary>
protected override void OnEnable()
{
#if !SERIALIZE_FIELD_MASKABLE
maskable = m_Maskable;
#endif
_cachedPosition = transform.localPosition;
activeMeshIndices.Clear();
@@ -439,6 +461,9 @@ namespace Coffee.UIExtensions
SetVerticesDirty();
m_ShouldRecalculateStencil = true;
RecalculateClipping();
#if !SERIALIZE_FIELD_MASKABLE
maskable = m_Maskable;
#endif
}
void ISerializationCallbackReceiver.OnBeforeSerialize()

View File

@@ -59,7 +59,7 @@ namespace Coffee.UIExtensions
private static void Refresh(UIParticle particle)
{
if (!particle || !particle.canvas || !particle.canvasRenderer) return;
if (!particle || !particle.bakedMesh || !particle.canvas || !particle.canvasRenderer) return;
Profiler.BeginSample("[UIParticle] Modify scale");
ModifyScale(particle);
@@ -211,9 +211,11 @@ namespace Coffee.UIExtensions
Profiler.EndSample();
}
#if UNITY_2018_3_OR_NEWER
// #102: Do not bake particle system to mesh when the alpha is zero.
if (Mathf.Approximately(particle.canvasRenderer.GetInheritedAlpha(), 0))
continue;
#endif
// Bake main particles.
var r = currentPs.GetComponent<ParticleSystemRenderer>();

View File

@@ -190,32 +190,54 @@ namespace Coffee.UIParticleExtensions
self.Sort((a, b) =>
{
var tr = transform;
var ra = a.GetComponent<ParticleSystemRenderer>();
var rb = b.GetComponent<ParticleSystemRenderer>();
var aRenderer = a.GetComponent<ParticleSystemRenderer>();
var bRenderer = b.GetComponent<ParticleSystemRenderer>();
if (!Mathf.Approximately(ra.sortingFudge, rb.sortingFudge))
return ra.sortingFudge < rb.sortingFudge ? 1 : -1;
// Render queue: ascending
var aMat = aRenderer.sharedMaterial;
var bMat = bRenderer.sharedMaterial;
if (aMat.renderQueue != bMat.renderQueue)
return aMat.renderQueue - bMat.renderQueue;
var pa = tr.InverseTransformPoint(a.transform.position).z;
var pb = tr.InverseTransformPoint(b.transform.position).z;
// Sorting layer: ascending
if (aRenderer.sortingLayerID != bRenderer.sortingLayerID)
return aRenderer.sortingLayerID - bRenderer.sortingLayerID;
if (!Mathf.Approximately(pa, pb))
return pa < pb ? 1 : -1;
// Sorting order: ascending
if (aRenderer.sortingOrder != bRenderer.sortingOrder)
return aRenderer.sortingOrder - bRenderer.sortingOrder;
var aQueue = ra.sharedMaterial.renderQueue;
var bQueue = rb.sharedMaterial.renderQueue;
if (aQueue != bQueue)
return aQueue < bQueue ? 1 : -1;
// Z position & sortingFudge: descending
var aTransform = a.transform;
var bTransform = b.transform;
var aPos = tr.InverseTransformPoint(aTransform.position).z + aRenderer.sortingFudge;
var bPos = tr.InverseTransformPoint(bTransform.position).z + bRenderer.sortingFudge;
if (!Mathf.Approximately(aPos, bPos))
return (int) Mathf.Sign(bPos - aPos);
var aHash = ra.sharedMaterial.GetHashCode();
var bHash = rb.sharedMaterial.GetHashCode();
if (aHash != bHash)
return aHash < bHash ? 1 : -1;
// Material instance ID: match
if (aMat.GetInstanceID() == bMat.GetInstanceID())
return 0;
return 0;
// Transform: ascending
return TransformCompare(aTransform, bTransform);
});
}
private static int TransformCompare(Transform a, Transform b)
{
while (true)
{
if (!a && !b) return 0;
if (!a) return -1;
if (!b) return 1;
if (a.parent == b.parent) return a.GetSiblingIndex() - b.GetSiblingIndex();
a = a.parent;
b = b.parent;
}
}
public static long GetMaterialHash(this ParticleSystem self, bool trail)
{
if (!self) return 0;

View File

@@ -2,7 +2,7 @@
"name": "com.coffee.ui-particle",
"displayName": "UI Particle",
"description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.",
"version": "3.0.0",
"version": "3.2.0",
"unity": "2018.2",
"license": "MIT",
"repository": {