From 56d949e0283c43ae3671696b22e01e5f910b44df Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Wed, 12 Dec 2018 21:56:38 +0900 Subject: [PATCH] close #18; New scaling system --- UIParticle.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UIParticle.cs b/UIParticle.cs index aab1d2f..3282048 100644 --- a/UIParticle.cs +++ b/UIParticle.cs @@ -237,8 +237,9 @@ namespace Coffee.UIExtensions Profiler.EndSample (); Profiler.BeginSample ("Make Matrix"); - var s = scale * canvas.scaleFactor; - scaleaMatrix = Matrix4x4.Scale (new Vector3 (s, s, s)); + scaleaMatrix = m_ParticleSystem.main.scalingMode == ParticleSystemScalingMode.Hierarchy + ? Matrix4x4.Scale (scale * Vector3.one) + : Matrix4x4.Scale (scale * canvas.rootCanvas.transform.localScale); Matrix4x4 matrix = default (Matrix4x4); switch (m_ParticleSystem.main.simulationSpace) {