[UI] Can shape size follow RectTransform size?

Avatar
  • updated

We're trying to use Shapes in world-space UI, e.g. for button outlines and stuff.

However, we're running into issues with RectTransform behaviours (e.g. fit into parent and such) and Shapes having an entirely own scale behaviour, not following the actual RectTransform.


Would be great to have an option to "follow" the parent scale instead of having to add scripts to make shapes actually have the right shape of a UI component they're in.

Image 168

RectTransforms in Unity have that behaviour thing on how they follow their parent RectTransform

Image 169


(I know, Shapes is not a UI library 🎨 that's why I flagged this as feature request not bug)

Reporting a bug? please specify Unity version:
2020.2.0b6
Reporting a bug? please specify Shapes version:
2.3.2
Reporting a bug? please specify Render Pipeline:
Avatar
Ivan Murzak

I made extensions for Shapes plugin. It is free and easy to use.

Image 417

There are two modes FILL and FIT.

Ability to save shape AspectRatio
Works perfectly with the list of shapes
--- Disc
--- Line
--- Polygon
--- Polyline
--- Quad
--- Rectangle
--- RegularPolygon
--- Triangle

https://github.com/IvanMurzak/Unity-Extensions#shapes-recttransform