feat: restore `Transform.localScale` when setting `autoScalingMode` to something other than `Transform` (again)

pull/318/head
mob-sakai 2024-06-26 23:13:19 +09:00
parent a703c2921c
commit 88a970d93a
1 changed files with 6 additions and 2 deletions

View File

@ -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)