fix: unintended scaling occurs when `AutoScalingMode=UIParticle` and `ScalingMode=Local`
close #292pull/310/head
parent
293dc43db7
commit
e32077fb0d
|
@ -515,6 +515,13 @@ namespace Coffee.UIExtensions
|
||||||
{
|
{
|
||||||
Profiler.BeginSample("[UIParticleRenderer] GetWorldScale");
|
Profiler.BeginSample("[UIParticleRenderer] GetWorldScale");
|
||||||
var scale = _parent.scale3DForCalc.GetScaled(_parent.parentScale);
|
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();
|
Profiler.EndSample();
|
||||||
return scale;
|
return scale;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue