Skip to content

Commit

Permalink
fix: unintended scaling occurs when AutoScalingMode=UIParticle and …
Browse files Browse the repository at this point in the history
…`ScalingMode=Local`

close #292
  • Loading branch information
mob-sakai committed Jan 26, 2024
1 parent 88890ff commit 1627de1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Packages/src/Runtime/UIParticleRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,13 @@ private Vector3 GetWorldScale()
{
Profiler.BeginSample("[UIParticleRenderer] GetWorldScale");
var scale = _parent.scale3DForCalc.GetScaled(_parent.parentScale);

if (_parent.autoScalingMode == UIParticle.AutoScalingMode.UIParticle
&& _particleSystem.main.scalingMode == ParticleSystemScalingMode.Local)
{
scale = scale.GetScaled(_parent.canvas.transform.localScale);
}

Profiler.EndSample();
return scale;
}
Expand Down

0 comments on commit 1627de1

Please sign in to comment.