You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add keep aspect ratio for sprite renderer
this would basically make sure the rect is always centered and and has the same size as the current texture frame.
Analysis
Pros
we would no longer need to make a script to adjust the rect on the sprite renderer.
Cons
none
Attachments
-Now
-What it could be
The text was updated successfully, but these errors were encountered:
Maybe it would make sense to add a method that sets a SpriteRenderer's Rect to the values obtained from the currently assigned Material/BatchInfo.
Something like a public void UseNativeSize(Alignment alignment) where Alignment is used to define the origin of the Rect.
Possibly add a button to call it from the editor as well, defaulting to Centered?
Summary
Add keep aspect ratio for sprite renderer
this would basically make sure the rect is always centered and and has the same size as the current texture frame.
Analysis
Pros
Cons
Attachments
-Now
-What it could be
The text was updated successfully, but these errors were encountered: