Recently I came across this question that had some really handy extension methods I thought I'd share. I've added AnchorToCorners as well. Feel free to share what you found useful for you
Very useful RectTransform extension methods
Code (csharp):
- public static class RectTransformExtensions
- {
- public static void AnchorToCorners(this RectTransform transform)
- {
- if (transform == null)
- throw new...