From cbb37b0b3acf0cd8d084a472a9932ccf86d30bc0 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Wed, 26 Jun 2024 23:13:19 +0900 Subject: [PATCH] feat: restore `Transform.localScale` when setting `autoScalingMode` to something other than `Transform` (again) --- Runtime/UIParticle.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Runtime/UIParticle.cs b/Runtime/UIParticle.cs index f8ebe44..d0e9e8a 100644 --- a/Runtime/UIParticle.cs +++ b/Runtime/UIParticle.cs @@ -535,8 +535,12 @@ namespace Coffee.UIExtensions } var currentScale = transform.localScale; - _storedScale = currentScale; - _isScaleStored = true; + if (!_isScaleStored) + { + _storedScale = currentScale.IsVisible() ? currentScale : Vector3.one; + _isScaleStored = true; + } + _tracker.Add(this, rectTransform, DrivenTransformProperties.Scale); var newScale = parentScale.Inverse(); if (currentScale != newScale)