feat: restore `Transform.localScale` when setting `autoScalingMode` to something other than `Transform` (again)
parent
a703c2921c
commit
88a970d93a
|
@ -535,8 +535,12 @@ namespace Coffee.UIExtensions
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentScale = transform.localScale;
|
var currentScale = transform.localScale;
|
||||||
_storedScale = currentScale;
|
if (!_isScaleStored)
|
||||||
_isScaleStored = true;
|
{
|
||||||
|
_storedScale = currentScale.IsVisible() ? currentScale : Vector3.one;
|
||||||
|
_isScaleStored = true;
|
||||||
|
}
|
||||||
|
|
||||||
_tracker.Add(this, rectTransform, DrivenTransformProperties.Scale);
|
_tracker.Add(this, rectTransform, DrivenTransformProperties.Scale);
|
||||||
var newScale = parentScale.Inverse();
|
var newScale = parentScale.Inverse();
|
||||||
if (currentScale != newScale)
|
if (currentScale != newScale)
|
||||||
|
|
Loading…
Reference in New Issue