From 89007985709a5a6c6f0187af3abdb056508dd465 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Mon, 10 Dec 2018 21:19:29 +0900 Subject: [PATCH] fix #15; Canvas.scaleFactor not take into account --- Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs b/Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs index ada82fe..95a1425 100644 --- a/Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs +++ b/Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs @@ -222,7 +222,7 @@ namespace Coffee.UIExtensions CheckTrail (); Profiler.EndSample (); - if (m_ParticleSystem) + if (m_ParticleSystem && canvas) { Profiler.BeginSample ("Disable ParticleSystemRenderer"); if (Application.isPlaying) @@ -232,7 +232,7 @@ namespace Coffee.UIExtensions Profiler.EndSample (); Profiler.BeginSample ("Make Matrix"); - var s = scale; + var s = scale * canvas.scaleFactor; scaleaMatrix = Matrix4x4.Scale (new Vector3 (s, s, s)); Matrix4x4 matrix = default (Matrix4x4); switch (m_ParticleSystem.main.simulationSpace)