From 9eb094bb43bfcca74e21c8b9d35225acfb3c5e0b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 25 Jun 2026 11:18:58 +0000 Subject: [PATCH 1/4] chore(release): 4.13.0 [skip ci] # [4.13.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.2...v4.13.0) (2026-06-25) ### Bug Fixes * `UI/Additive` shader does not support RectMask2D softness. ([83145d3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/83145d3a6ede3831d1f7c49afde6ef7d8a498d21)) * rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/10f82a8579a2d055f897e7a8d6f3b5ba1fc43ae8)) * Support for skipping "reload domain" ([b7bb112](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b7bb1124f6921ebca1b48991462637767b95e504)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406) * there is a compilation error in Unity 2019.2 or earlier ([c327632](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c327632e1eb203351ba1a1087a19eb7838c22530)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407) ### Features * add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ea2fcfd8099a24b92624d34600beb519fb9d2b38)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399) * preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/108bcfbd246960dc730546dc334424cf2e17bfd4)) * project-wide default view size for baking ([8e0ff10](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8e0ff10c7344d9f53d2f4f096ddeb7392b67f930)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360) --- Packages/src/CHANGELOG.md | 17 +++++++++++++++++ Packages/src/package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Packages/src/CHANGELOG.md b/Packages/src/CHANGELOG.md index fe8f706..71f8701 100644 --- a/Packages/src/CHANGELOG.md +++ b/Packages/src/CHANGELOG.md @@ -1,3 +1,20 @@ +# [4.13.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.2...v4.13.0) (2026-06-25) + + +### Bug Fixes + +* `UI/Additive` shader does not support RectMask2D softness. ([83145d3](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/83145d3a6ede3831d1f7c49afde6ef7d8a498d21)) +* rename `UIParticleProjectSettings.enableLinearToGamma` to `autoColorCorrection` ([10f82a8](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/10f82a8579a2d055f897e7a8d6f3b5ba1fc43ae8)) +* Support for skipping "reload domain" ([b7bb112](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b7bb1124f6921ebca1b48991462637767b95e504)), closes [#406](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/406) +* there is a compilation error in Unity 2019.2 or earlier ([c327632](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/c327632e1eb203351ba1a1087a19eb7838c22530)), closes [#407](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/407) + + +### Features + +* add fields located outside the `Properties` block in the shader as `Animatable Properties` ([ea2fcfd](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/ea2fcfd8099a24b92624d34600beb519fb9d2b38)), closes [#399](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/399) +* preview the ParticleSystem playback when selecting a UIParticle in the Editor ([108bcfb](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/108bcfbd246960dc730546dc334424cf2e17bfd4)) +* project-wide default view size for baking ([8e0ff10](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/8e0ff10c7344d9f53d2f4f096ddeb7392b67f930)), closes [#360](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/360) + ## [4.12.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.1...v4.12.2) (2026-06-08) diff --git a/Packages/src/package.json b/Packages/src/package.json index c1813d1..82f89ab 100644 --- a/Packages/src/package.json +++ b/Packages/src/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.ui-particle", "displayName": "UI Particle", "description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.", - "version": "4.12.2", + "version": "4.13.0", "unity": "2018.2", "license": "MIT", "repository": { From 26fd3da20b6b07f7a26df662358c53757a7cc5f5 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:21:53 +0900 Subject: [PATCH 2/4] fix: add support for Unity 6.7 close #408 --- .../Internal/Extensions/MeshExtensions.cs | 153 ++++++++++++++++++ .../Extensions/MeshExtensions.cs.meta | 11 ++ Packages/src/Runtime/UIParticleRenderer.cs | 13 +- 3 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs create mode 100644 Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs.meta diff --git a/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs b/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs new file mode 100644 index 0000000..4a8d132 --- /dev/null +++ b/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs @@ -0,0 +1,153 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace Coffee.UIParticleInternal +{ + internal static class MeshExtensions + { + internal static readonly InternalObjectPool s_MeshPool = new InternalObjectPool( + () => + { + var mesh = new Mesh + { + hideFlags = HideFlags.DontSave | HideFlags.NotEditable + }; + mesh.MarkDynamic(); + return mesh; + }, + mesh => mesh, + mesh => + { + if (mesh != null) + { + mesh.Clear(); + } + }); + + public static Mesh Rent() + { + return s_MeshPool.Rent(); + } + + public static void Return(ref Mesh mesh) + { + s_MeshPool.Return(ref mesh); + } + + public static void CopyTo(this Mesh self, Mesh dst) + { + if (self == null || dst == null) return; + + var vector3List = InternalListPool.Rent(); + var vector4List = InternalListPool.Rent(); + var color32List = InternalListPool.Rent(); + var intList = InternalListPool.Rent(); + + dst.Clear(false); + + self.GetVertices(vector3List); + dst.SetVertices(vector3List); + + self.GetTriangles(intList, 0); + dst.SetTriangles(intList, 0); + + self.GetNormals(vector3List); + dst.SetNormals(vector3List); + + self.GetTangents(vector4List); + dst.SetTangents(vector4List); + + self.GetColors(color32List); + dst.SetColors(color32List); + + self.GetUVs(0, vector4List); + dst.SetUVs(0, vector4List); + + self.GetUVs(1, vector4List); + dst.SetUVs(1, vector4List); + + self.GetUVs(2, vector4List); + dst.SetUVs(2, vector4List); + + self.GetUVs(3, vector4List); + dst.SetUVs(3, vector4List); + + dst.RecalculateBounds(); + InternalListPool.Return(ref vector3List); + InternalListPool.Return(ref vector4List); + InternalListPool.Return(ref color32List); + InternalListPool.Return(ref intList); + } + + public static void CopyTo(this VertexHelper self, Mesh dst) + { + if (self == null || dst == null) return; + + self.FillMesh(dst); + } + + public static void CopyTo(this Mesh self, VertexHelper dst) + { + if (self == null || dst == null) return; + + var vertexCount = self.vertexCount; + var indexCount = self.triangles.Length; + self.CopyTo(dst, vertexCount, indexCount); + } + + public static void CopyTo(this Mesh self, VertexHelper dst, int vertexCount, int indexCount) + { + if (self == null || dst == null) return; + + var positions = InternalListPool.Rent(); + var normals = InternalListPool.Rent(); + var uv0 = InternalListPool.Rent(); + var uv1 = InternalListPool.Rent(); + var uv2 = InternalListPool.Rent(); + var uv3 = InternalListPool.Rent(); + var tangents = InternalListPool.Rent(); + var colors = InternalListPool.Rent(); + var indices = InternalListPool.Rent(); + self.GetVertices(positions); + self.GetColors(colors); + self.GetUVs(0, uv0); + self.GetUVs(1, uv1); + self.GetUVs(2, uv1); + self.GetUVs(3, uv1); + self.GetNormals(normals); + self.GetTangents(tangents); + self.GetIndices(indices, 0); + + dst.Clear(); + for (var i = 0; i < vertexCount; i++) + { + dst.AddVert(positions.GetOrDefault(i), colors.GetOrDefault(i), uv0.GetOrDefault(i), uv1.GetOrDefault(i), + uv2.GetOrDefault(i), uv3.GetOrDefault(i), normals.GetOrDefault(i), tangents.GetOrDefault(i)); + } + + var count = Mathf.Clamp(indexCount, 0, indices.Count); + for (var i = 0; i < count - 2; i += 3) + { + dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]); + } + + InternalListPool.Return(ref positions); + InternalListPool.Return(ref normals); + InternalListPool.Return(ref uv0); + InternalListPool.Return(ref uv1); + InternalListPool.Return(ref uv2); + InternalListPool.Return(ref uv3); + InternalListPool.Return(ref tangents); + InternalListPool.Return(ref colors); + InternalListPool.Return(ref indices); + } + + private static T GetOrDefault(this List self, int index) + { + return 0 <= index && index < self.Count + ? self[index] + : default; + } + } +} diff --git a/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs.meta b/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs.meta new file mode 100644 index 0000000..0902e29 --- /dev/null +++ b/Packages/src/Runtime/Internal/Extensions/MeshExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8c949d47f5c6d4d22bd7baebc60d48f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/src/Runtime/UIParticleRenderer.cs b/Packages/src/Runtime/UIParticleRenderer.cs index a26c562..3dd3789 100644 --- a/Packages/src/Runtime/UIParticleRenderer.cs +++ b/Packages/src/Runtime/UIParticleRenderer.cs @@ -26,6 +26,7 @@ namespace Coffee.UIExtensions private static readonly List s_Materials = new List(2); private static MaterialPropertyBlock s_Mpb; private static readonly Vector3[] s_Corners = new Vector3[4]; + private static readonly VertexHelper s_VertexHelper = new VertexHelper(); private bool _delay; private int _index; private bool _isPrevStored; @@ -451,11 +452,15 @@ namespace Coffee.UIExtensions var components = InternalListPool.Rent(); GetComponents(typeof(IMeshModifier), components); - for (var i = 0; i < components.Count; i++) + if (0 < components.Count) { -#pragma warning disable CS0618 // Type or member is obsolete - ((IMeshModifier)components[i]).ModifyMesh(workerMesh); -#pragma warning restore CS0618 // Type or member is obsolete + workerMesh.CopyTo(s_VertexHelper); + for (var i = 0; i < components.Count; i++) + { + ((IMeshModifier)components[i]).ModifyMesh(s_VertexHelper); + } + + s_VertexHelper.FillMesh(workerMesh); } InternalListPool.Return(ref components); From bad976cf01180bdabf5cd2f1760e069afdcb644a Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:22:45 +0900 Subject: [PATCH 3/4] fix: `ParticleSystemPreviewer` is no longer included in build --- Packages/src/README.md | 14 +++++++------ .../src/Runtime/ParticleSystemPreviewer.cs | 21 ++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Packages/src/README.md b/Packages/src/README.md index c1102f0..4709d57 100644 --- a/Packages/src/README.md +++ b/Packages/src/README.md @@ -34,6 +34,7 @@ You can render, mask, and sort your `ParticleSystems` for UI without the need fo - [Usage with `Mask` or `RectMask2D` Component](#usage-with-mask-or-rectmask2d-component) - [Usage with Script](#usage-with-script) - [Component: UIParticleAttractor](#component-uiparticleattractor) + - [Component: ParticleSystemPreviewer](#component-particlesystempreviewer) - [Project Settings](#project-settings) - [🛠 Development Note](#-development-note) - [Compares the Baking mesh approach with the conventional approach](#compares-the-baking-mesh-approach-with-the-conventional-approach) @@ -116,7 +117,7 @@ _This package requires **Unity 2018.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-particle@4.9.0 + openupm add com.coffee.ui-particle@4.13.0 ``` #### Install via UPM (with Package Manager UI) @@ -125,7 +126,7 @@ _This package requires **Unity 2018.3 or later**._ - Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/ParticleEffectForUGUI.git` ![](https://github.com/user-attachments/assets/f88f47ad-c606-44bd-9e86-ee3f72eac548) - To update the package, change suffix `#{version}` to the target version. - - e.g. `https://github.com/mob-sakai/ParticleEffectForUGUI.git#4.9.0` + - e.g. `https://github.com/mob-sakai/ParticleEffectForUGUI.git#4.13.0` #### Install via UPM (Manually) @@ -140,7 +141,7 @@ _This package requires **Unity 2018.3 or later**._ ``` - To update the package, change suffix `#{version}` to the target version. - - e.g. `"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#4.9.0",` + - e.g. `"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#4.13.0",` #### Install as Embedded Package @@ -271,16 +272,17 @@ uiParticle.Stop(); - **Unscaled Time:** Update with unscaled delta time. - **OnAttracted**: An event called when attracting is complete (per particle). -

### Component: ParticleSystemPreviewer -`ParticleSystemPreviewer` is used to preview a ParticleSystem in the editor. +`ParticleSystemPreviewer` is used to preview a `ParticleSystem` in the editor. + +![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1782441157549.png) - When a `GameObject` with this component is selected in the editor, a temporary `ParticleSystem` is added if needed so you can preview the effect in the Scene view. - The generated `ParticleSystem` is marked with `HideFlags.DontSave`, so it is neither saved nor included in builds. - +- This component will be removed in builds.

diff --git a/Packages/src/Runtime/ParticleSystemPreviewer.cs b/Packages/src/Runtime/ParticleSystemPreviewer.cs index a884fe5..d1be52b 100644 --- a/Packages/src/Runtime/ParticleSystemPreviewer.cs +++ b/Packages/src/Runtime/ParticleSystemPreviewer.cs @@ -1,3 +1,4 @@ +#if UNITY_EDITOR using System.Collections.Generic; using System.Linq; using Coffee.UIParticleInternal; @@ -13,7 +14,6 @@ namespace Coffee.UIExtensions // Do nothing. } -#if UNITY_EDITOR [CustomEditor(typeof(ParticleSystemPreviewer))] [CanEditMultipleObjects] internal class ParticleSystemPreviewerEditor : Editor @@ -29,6 +29,7 @@ namespace Coffee.UIExtensions public override void OnInspectorGUI() { base.OnInspectorGUI(); + EditorGUILayout.HelpBox("ParticleSystemPreviewer will be removed in build.", MessageType.Warning); ParticleSystemPreviewSystem.DrawWarningForTemporary(_gameObjects); ParticleSystemPreviewSystem.DrawWarningForPermanent(_gameObjects); } @@ -43,6 +44,12 @@ namespace Coffee.UIExtensions { private const HideFlags k_TemporaryHideFlags = HideFlags.DontSave | HideFlags.NotEditable; + private const string k_TemporaryMesssage = "The temporary ParticleSystem for preview is attached.\n" + + "It will be removed when exiting edit mode."; + + private const string k_PermanentMesssage = "The permanent ParticleSystem is attached.\n" + + "It will be included in build."; + [SerializeField] private List m_PreviewObjects = new List(); @@ -192,8 +199,7 @@ namespace Coffee.UIExtensions { if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasTemporaryParticleSystem)) return; - if (WarningButton("The temporary ParticleSystem for preview is attached.\n" + - "It will be removed when exiting edit mode.", "Remove")) + if (HelpBoxButton(MessageType.Warning, k_TemporaryMesssage, "Remove")) { foreach (var go in gameObjects) { @@ -209,8 +215,7 @@ namespace Coffee.UIExtensions { if (gameObjects == null || gameObjects.Length == 0 || !gameObjects.Any(HasPermanentParticleSystem)) return; - if (WarningButton("The permanent ParticleSystem is attached.\n" + - "It will be included in build.", "Remove")) + if (HelpBoxButton(MessageType.Info, k_PermanentMesssage, "Remove")) { foreach (var go in gameObjects) { @@ -224,14 +229,14 @@ namespace Coffee.UIExtensions } } - private static bool WarningButton(string message, string buttonText) + private static bool HelpBoxButton(MessageType messageType, string message, string buttonText) { EditorGUILayout.BeginHorizontal(); - EditorGUILayout.HelpBox(message, MessageType.Warning, true); + EditorGUILayout.HelpBox(message, messageType, true); var clicked = GUILayout.Button(EditorGUIUtility.TrTempContent(buttonText)); EditorGUILayout.EndHorizontal(); return clicked; } } -#endif } +#endif From 5393947b3b37bb80e3dff6781030a0cd5e639549 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 26 Jun 2026 02:57:47 +0000 Subject: [PATCH 4/4] chore(release): 4.13.1 [skip ci] ## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26) ### Bug Fixes * `ParticleSystemPreviewer` is no longer included in build ([bad976c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/bad976cf01180bdabf5cd2f1760e069afdcb644a)) * add support for Unity 6.7 ([26fd3da](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/26fd3da20b6b07f7a26df662358c53757a7cc5f5)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408) --- Packages/src/CHANGELOG.md | 8 ++++++++ Packages/src/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Packages/src/CHANGELOG.md b/Packages/src/CHANGELOG.md index 71f8701..dc5d397 100644 --- a/Packages/src/CHANGELOG.md +++ b/Packages/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26) + + +### Bug Fixes + +* `ParticleSystemPreviewer` is no longer included in build ([bad976c](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/bad976cf01180bdabf5cd2f1760e069afdcb644a)) +* add support for Unity 6.7 ([26fd3da](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/26fd3da20b6b07f7a26df662358c53757a7cc5f5)), closes [#408](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/408) + # [4.13.0](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.12.2...v4.13.0) (2026-06-25) diff --git a/Packages/src/package.json b/Packages/src/package.json index 82f89ab..4f844c5 100644 --- a/Packages/src/package.json +++ b/Packages/src/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.ui-particle", "displayName": "UI Particle", "description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.", - "version": "4.13.0", + "version": "4.13.1", "unity": "2018.2", "license": "MIT", "repository": {