Normally (in CSS aka USS) you’d use conic-gradient or a rotated clip: rect, but afaik Unity has not implemented those two CSS values so the above methods are the best way.
It’s pretty complicated compared to UGUI (even if you require that rounded edges look): Non-Rounded Edges:
Rounded Edges:
Someone will likely have to make a framework to make this easier, kind of how “Bootstrap” exists for CSS, otherwise a lot of game devs are going to have to learn HTML/CSS concepts… Which is not practical.