You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
fix: if the UIParticle parents do not have Canvas, an exception is thrown in OnEnable
close #300
This commit is contained in:
@@ -514,7 +514,8 @@ namespace Coffee.UIExtensions
|
||||
var scale = _parent.scale3DForCalc.GetScaled(_parent.parentScale);
|
||||
|
||||
if (_parent.autoScalingMode == UIParticle.AutoScalingMode.UIParticle
|
||||
&& _particleSystem.main.scalingMode == ParticleSystemScalingMode.Local)
|
||||
&& _particleSystem.main.scalingMode == ParticleSystemScalingMode.Local
|
||||
&& _parent.canvas)
|
||||
{
|
||||
scale = scale.GetScaled(_parent.canvas.transform.localScale);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user