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

pull/336/head
mob-sakai 2024-06-26 23:13:19 +09:00
parent 3c54f6dc8d
commit cbb37b0b3a
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)