Skip to content

Commit

Permalink
feat: restore Transform.localScale when setting autoScalingMode t…
Browse files Browse the repository at this point in the history
…o something other than `Transform` (again)
  • Loading branch information
mob-sakai committed Jun 27, 2024
1 parent 4252f11 commit 04232b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Packages/src/Runtime/UIParticle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,12 @@ internal void UpdateTransformScale()
}

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)
Expand Down

0 comments on commit 04232b6

Please sign in to comment.