Compare commits

...

8 Commits
3.3.3 ... 3.3.4

Author SHA1 Message Date
semantic-release-bot
9f9e04724d chore(release): 3.3.4 [skip ci]
## [3.3.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.3...3.3.4) (2021-02-22)

### Bug Fixes

* Multiselecting sets all scales to the same value ([13223b2](13223b2d74))
* support sub emitter with 'PlayOnAwake' ([d5ce78a](d5ce78ae5a))
* The maximum material count is 8 ([3bb5241](3bb5241275))
2021-02-22 12:24:08 +00:00
mob-sakai
5981af6c0a build: update release workflow 2021-02-22 18:32:39 +09:00
mob-sakai
f38240f527 test: update test workflow 2021-02-22 18:32:39 +09:00
mob-sakai
d775e805fb Merge pull request #150 from Tointer/fix_multiselecting_bug
fix: Multiselecting sets all scales to the same value
2021-02-19 09:57:37 +09:00
mob-sakai
d9eb91c120 refactor: modify the value when the field is changed 2021-02-19 09:57:02 +09:00
ibragimov.i
13223b2d74 fix: Multiselecting sets all scales to the same value 2021-02-18 23:28:06 +03:00
mob-sakai
d5ce78ae5a fix: support sub emitter with 'PlayOnAwake' 2021-02-18 13:48:37 +09:00
mob-sakai
3bb5241275 fix: The maximum material count is 8 2021-02-18 13:44:47 +09:00
8 changed files with 84 additions and 16 deletions

View File

@@ -12,12 +12,13 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]') && ! contains(github.event.head_commit.message, '[ci skip]')"
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
- uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ github.token }}

View File

@@ -29,8 +29,6 @@ jobs:
"2020.1.17f1",
"2020.2.1f1",
]
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
steps:
# Checkout sandbox project
@@ -64,9 +62,9 @@ jobs:
uses: game-ci/unity-test-runner@main
with:
unityVersion: ${{ matrix.unityVersion }}
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
customParameters: -enableCodeCoverage
# customParameters: -enableCodeCoverage -coverageOptions assemblyFilters:+CSharpCompilerSettings_,-*-CSharp,-*.Tests,-IgnoreAccessibility
customParameters: -nographics -enableCodeCoverage -coverageOptions assemblyFilters:+Coffee.UIParticle.*Tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- uses: actions/upload-artifact@v2
if: always()

25
.releaserc.json Normal file
View File

@@ -0,0 +1,25 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
"main",
{
"name": "preview",
"prerelease": true
}
],
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/git",
"@semantic-release/github"
]
}

View File

@@ -1,3 +1,12 @@
## [3.3.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.3...3.3.4) (2021-02-22)
### Bug Fixes
* Multiselecting sets all scales to the same value ([13223b2](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/13223b2d747609cf88b424ad590bda7f857b387d))
* support sub emitter with 'PlayOnAwake' ([d5ce78a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/d5ce78ae5acf2740ba7fdc6cde9f197c4e165484))
* The maximum material count is 8 ([3bb5241](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/3bb52412751360409747192150188ae904f2c3d3))
## [3.3.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.2...3.3.3) (2021-02-03)

View File

@@ -250,20 +250,27 @@ namespace Coffee.UIExtensions
EditorGUILayout.BeginHorizontal();
if (showXyz)
{
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(sp);
if (EditorGUI.EndChangeCheck())
{
x.floatValue = Mathf.Max(0.001f, x.floatValue);
y.floatValue = Mathf.Max(0.001f, y.floatValue);
z.floatValue = Mathf.Max(0.001f, z.floatValue);
}
}
else
{
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(x, s_ContentScale);
if (EditorGUI.EndChangeCheck())
z.floatValue = y.floatValue = x.floatValue;
{
x.floatValue = Mathf.Max(0.001f, x.floatValue);
y.floatValue = Mathf.Max(0.001f, x.floatValue);
z.floatValue = Mathf.Max(0.001f, x.floatValue);
}
}
x.floatValue = Mathf.Max(0.001f, x.floatValue);
y.floatValue = Mathf.Max(0.001f, y.floatValue);
z.floatValue = Mathf.Max(0.001f, z.floatValue);
EditorGUI.BeginChangeCheck();
showXyz = GUILayout.Toggle(showXyz, s_Content3D, EditorStyles.miniButton, GUILayout.Width(30));
if (EditorGUI.EndChangeCheck() && !showXyz)

View File

@@ -1,6 +1,7 @@
#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;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Coffee.UIParticleExtensions;
@@ -60,6 +61,7 @@ namespace Coffee.UIExtensions
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>();
private static readonly List<ParticleSystem> s_ParticleSystems = new List<ParticleSystem>();
/// <summary>
@@ -266,7 +268,7 @@ namespace Coffee.UIExtensions
//
GetComponents(typeof(IMaterialModifier), s_Components);
var materialCount = Mathf.Max(8, count);
var materialCount = Mathf.Min(8, count);
canvasRenderer.materialCount = materialCount;
var j = 0;
for (var i = 0; i < particles.Count; i++)
@@ -407,6 +409,22 @@ namespace Coffee.UIExtensions
InitializeIfNeeded();
}
private new IEnumerator Start()
{
// #148: Particle Sub Emitter not showing when start game
var hasPlayingSubEmitter = particles.AnyFast(ps =>
{
ps.GetComponentsInChildren(false, s_ParticleSystems);
return s_ParticleSystems.AnyFast(p => p.isPlaying && p.subEmitters.enabled);
});
s_ParticleSystems.Clear();
if (!hasPlayingSubEmitter) yield break;
Stop();
yield return null;
Play();
}
/// <summary>
/// This function is called when the behaviour becomes disabled.
/// </summary>

View File

@@ -65,6 +65,16 @@ namespace Coffee.UIParticleExtensions
return false;
}
public static bool AnyFast<T>(this List<T> self, Predicate<T> predicate) where T : Object
{
for (var i = 0; i < self.Count; ++i)
{
if (self[i] && predicate(self[i])) return true;
}
return false;
}
}
internal static class MeshExtensions

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.3.3",
"version": "3.3.4",
"unity": "2018.2",
"license": "MIT",
"repository": {