From 54a4b1cdfd06400c7be89c1ee704bb42a659c7c2 Mon Sep 17 00:00:00 2001
From: mob-sakai <12690315+mob-sakai@users.noreply.github.com>
Date: Tue, 18 Jun 2024 17:47:45 +0900
Subject: [PATCH] fix: UIParticle is scaled by canvas size even when
 `AutoScalingMode.None` and `ScalingMode.Local`

close #313
---
 Packages/src/Runtime/UIParticle.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Packages/src/Runtime/UIParticle.cs b/Packages/src/Runtime/UIParticle.cs
index f4d66b5..cce8314 100644
--- a/Packages/src/Runtime/UIParticle.cs
+++ b/Packages/src/Runtime/UIParticle.cs
@@ -250,9 +250,9 @@ namespace Coffee.UIExtensions
         /// <summary>
         /// Particle effect scale.
         /// </summary>
-        public Vector3 scale3DForCalc => autoScalingMode == AutoScalingMode.UIParticle
-            ? m_Scale3D.GetScaled(canvasScale)
-            : m_Scale3D;
+        public Vector3 scale3DForCalc => autoScalingMode == AutoScalingMode.Transform
+            ? m_Scale3D
+            : m_Scale3D.GetScaled(canvasScale);
 
         public List<ParticleSystem> particles => m_Particles;