From 76eea1665e44f6666e1e8bc05b754363ab05f948 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 26 Feb 2019 11:10:47 +0900 Subject: [PATCH 1/5] fix #44; v2.2.0 has 2 warnings --- Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs | 4 ++-- Assets/UIParticle_Demo/UIParticle_Demo.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs index 05bbc19..b808b27 100755 --- a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs +++ b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs @@ -54,9 +54,9 @@ namespace Coffee.UIExtensions }; [SerializeField] - string m_Name; + string m_Name = ""; [SerializeField] - ShaderPropertyType m_Type; + ShaderPropertyType m_Type = ShaderPropertyType.Vector; public int id { get; private set; } public ShaderPropertyType type { get { return m_Type; } } diff --git a/Assets/UIParticle_Demo/UIParticle_Demo.cs b/Assets/UIParticle_Demo/UIParticle_Demo.cs index e5e614a..36d69bf 100644 --- a/Assets/UIParticle_Demo/UIParticle_Demo.cs +++ b/Assets/UIParticle_Demo/UIParticle_Demo.cs @@ -7,9 +7,9 @@ namespace Coffee.UIExtensions.Demo { public class UIParticle_Demo : MonoBehaviour { - [SerializeField] ParticleSystem [] m_ParticleSystems; - [SerializeField] List m_ScalingByTransforms; - [SerializeField] List m_ScalingByUIParticles; + [SerializeField] ParticleSystem [] m_ParticleSystems = new ParticleSystem [0]; + [SerializeField] List m_ScalingByTransforms = new List (); + [SerializeField] List m_ScalingByUIParticles = new List (); public void SetTimeScale (float scale) { From eb0176a78cc4e4d4123a6c3be8cfc05857ca0863 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 26 Feb 2019 11:11:48 +0900 Subject: [PATCH 2/5] Format --- .../UIParticle/Scripts/Editor/UIParticleEditor.cs | 4 ++-- Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs | 2 +- Assets/UIParticle_Demo/UIParticle_Demo.cs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIParticle/Scripts/Editor/UIParticleEditor.cs b/Assets/Coffee/UIExtensions/UIParticle/Scripts/Editor/UIParticleEditor.cs index 6d3a415..6afb1c2 100644 --- a/Assets/Coffee/UIExtensions/UIParticle/Scripts/Editor/UIParticleEditor.cs +++ b/Assets/Coffee/UIExtensions/UIParticle/Scripts/Editor/UIParticleEditor.cs @@ -228,7 +228,7 @@ namespace Coffee.UIExtensions { if (!mat.HasProperty (propName)) { - EditorGUILayout.HelpBox (string.Format("Shader {0} doesn't have '{1}' property. This graphic is not maskable.", shader.name, propName), MessageType.Warning); + EditorGUILayout.HelpBox (string.Format ("Shader {0} doesn't have '{1}' property. This graphic is not maskable.", shader.name, propName), MessageType.Warning); break; } } @@ -310,7 +310,7 @@ namespace Coffee.UIExtensions transformMatrix *= emitterMatrix; Handles.matrix = transformMatrix; - if(uip.canvas.renderMode == RenderMode.ScreenSpaceOverlay || ps.main.scalingMode == ParticleSystemScalingMode.Hierarchy) + if (uip.canvas.renderMode == RenderMode.ScreenSpaceOverlay || ps.main.scalingMode == ParticleSystemScalingMode.Hierarchy) { Handles.matrix = Handles.matrix * Matrix4x4.Scale (Vector3.one * uip.scale); } diff --git a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs index b808b27..d5bd598 100755 --- a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs +++ b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs @@ -37,7 +37,7 @@ namespace Coffee.UIExtensions [SerializeField] bool m_IgnoreParent = false; [Tooltip ("Animatable material properties. AnimationでParticleSystemのマテリアルプロパティを変更する場合、有効にしてください。")] - [SerializeField] AnimatableProperty[] m_AnimatableProperties = new AnimatableProperty[0]; + [SerializeField] AnimatableProperty [] m_AnimatableProperties = new AnimatableProperty [0]; static MaterialPropertyBlock s_Mpb; diff --git a/Assets/UIParticle_Demo/UIParticle_Demo.cs b/Assets/UIParticle_Demo/UIParticle_Demo.cs index 36d69bf..5721799 100644 --- a/Assets/UIParticle_Demo/UIParticle_Demo.cs +++ b/Assets/UIParticle_Demo/UIParticle_Demo.cs @@ -56,15 +56,15 @@ namespace Coffee.UIExtensions.Demo m_ScalingByUIParticles.ForEach (x => x.scale = scale); } - public void SetUIParticleScale(float scale) + public void SetUIParticleScale (float scale) { - foreach(var uip in FindObjectsOfType()) + foreach (var uip in FindObjectsOfType ()) { uip.scale = scale; } } - public void LoadScene(string name) + public void LoadScene (string name) { SceneManager.LoadScene (name); } From e5f400974877643ec9cc2110e8b66621179d94b8 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 26 Feb 2019 11:13:59 +0900 Subject: [PATCH 3/5] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8951693..245ffd1 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Find the manifest.json file in the Packages folder of your project and edit it t ```js { "dependencies": { - "com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.0", + "com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.1", ... }, } From d9a43cd4a2796899af79e9185a95b15bde63c9c5 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 26 Feb 2019 11:26:56 +0900 Subject: [PATCH 4/5] close #45; Disable ParticleSystemRenderer on reset --- .../UIExtensions/UIParticle/Scripts/UIParticle.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs index d5bd598..8eaaebe 100755 --- a/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs +++ b/Assets/Coffee/UIExtensions/UIParticle/Scripts/UIParticle.cs @@ -255,6 +255,21 @@ namespace Coffee.UIExtensions base.OnDisable (); } +#if UNITY_EDITOR + /// + /// Reset to default values. + /// + protected override void Reset () + { + // Disable ParticleSystemRenderer on reset. + if (cachedParticleSystem) + { + cachedParticleSystem.GetComponent ().enabled = false; + } + base.Reset (); + } +#endif + /// /// Call to update the geometry of the Graphic onto the CanvasRenderer. /// From 7d9b8dec5c4fe7a2777a4eb7baa09ea015d4a3fb Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 26 Feb 2019 11:30:17 +0900 Subject: [PATCH 5/5] update documents for v2.2.1 --- Assets/Coffee/UIExtensions/UIParticle/CHANGELOG.md | 9 +++++++++ Assets/Coffee/UIExtensions/UIParticle/README.md | 2 +- Assets/Coffee/UIExtensions/UIParticle/package.json | 2 +- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIParticle/CHANGELOG.md b/Assets/Coffee/UIExtensions/UIParticle/CHANGELOG.md index 83b1ebf..50f1232 100644 --- a/Assets/Coffee/UIExtensions/UIParticle/CHANGELOG.md +++ b/Assets/Coffee/UIExtensions/UIParticle/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [v2.2.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.1) (2019-02-26) + +[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.2.0...v2.2.1) + +**Fixed bugs:** + +- v2.2.0 has 2 warnings [\#44](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/44) +- Disable ParticleSystemRenderer on reset [\#45](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/45) + ## [v2.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.0) (2019-02-23) [Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.1...v2.2.0) diff --git a/Assets/Coffee/UIExtensions/UIParticle/README.md b/Assets/Coffee/UIExtensions/UIParticle/README.md index 8951693..245ffd1 100644 --- a/Assets/Coffee/UIExtensions/UIParticle/README.md +++ b/Assets/Coffee/UIExtensions/UIParticle/README.md @@ -76,7 +76,7 @@ Find the manifest.json file in the Packages folder of your project and edit it t ```js { "dependencies": { - "com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.0", + "com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.1", ... }, } diff --git a/Assets/Coffee/UIExtensions/UIParticle/package.json b/Assets/Coffee/UIExtensions/UIParticle/package.json index 366ed0d..5ef04cd 100644 --- a/Assets/Coffee/UIExtensions/UIParticle/package.json +++ b/Assets/Coffee/UIExtensions/UIParticle/package.json @@ -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": "2.2.0", + "version": "2.2.1", "unity": "2018.2", "license": "MIT", "repository": { diff --git a/CHANGELOG.md b/CHANGELOG.md index 83b1ebf..50f1232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [v2.2.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.1) (2019-02-26) + +[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.2.0...v2.2.1) + +**Fixed bugs:** + +- v2.2.0 has 2 warnings [\#44](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/44) +- Disable ParticleSystemRenderer on reset [\#45](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/45) + ## [v2.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.0) (2019-02-23) [Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.1...v2.2.0) diff --git a/package.json b/package.json index 366ed0d..5ef04cd 100644 --- a/package.json +++ b/package.json @@ -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": "2.2.0", + "version": "2.2.1", "unity": "2018.2", "license": "MIT", "repository": {