RectMask2D Softness Question for Unity Devs

Why is the Softness value in RectMask2D a Vector2Int instead of a Vector4? My team would use RectMask2D for a lot more things if Softness could be set discreetly per side.

Most common example: Fading the bottom of a vertical scroll view about 150px and the top only about 20px. Currently we have to do this using a 3rd party plugin called SoftMask, which has been problematic due to mixing mask types.

Maybe a Softness Offset feature could be introduced additively, which wouldn’t disrupt existing Inspector data for everyone? I already looked into inheriting from RectMask2D and simply using a custom editor to display discreet fields in the inspector, but there are some core scripts that I would need to edit to make it work.

2 Likes

We’d love this too.

To drive this even further, we would likely programmatically update these values based on the position of the scroll content. For instance: if the scroll content isn’t off one edge, we would turn off the softness, and fade the softness in as the user scrolls content in one direction or another.