Skip to content

Commit

Permalink
fix #15; Canvas.scaleFactor not take into account
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Dec 10, 2018
1 parent 79922a8 commit 8900798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Coffee/UIExtensions/UIParticle/UIParticle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void UpdateMesh ()
CheckTrail ();
Profiler.EndSample ();

if (m_ParticleSystem)
if (m_ParticleSystem && canvas)
{
Profiler.BeginSample ("Disable ParticleSystemRenderer");
if (Application.isPlaying)
Expand All @@ -232,7 +232,7 @@ void UpdateMesh ()
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)
Expand Down

0 comments on commit 8900798

Please sign in to comment.