A working Polygon renderer for Unity UI, that works in Unity 2022 LTS
I really liked the ideas in an old polygon renderer that can be found at https://github.com/CiaccoDavide/Unity-UI-Polygon however it did not work for some reason. It seemed to be an issue with a new version of unity. I reimplemented it from scratch, so it should be futureproofed (for now!). If not, I used RawImage as a baseline for figuring out what to do and then wrote an editor for it.
To add, just add like you would an Image or button.
It even supports masking! I'm not sure if the old one did.