Transforming from root canvas to local and back

Hi

Transform has TransformDirection, TransformPoint, TransformVector and InverseTransform[…] to go from local space to global and back.
Is there such a thing for RectTransform? the inherited ones ignore the RectTransforms. I’d like to be able to transform a point from local to canvas and back. Transforming to root canvas would allow me to then transform to world and have maximum flexibility, specially because the root RectTransform would include the canvas scaler.

I see there’s a lossyscale (global scale), but that’s about it, no rotation and no position. It’s hard to make generic controls without that. I used GetWorldCorners, but it seems to at least ignore the canvas scaler (and probably other RectTransforms in the hierarchy) and it’s limited anyway, as sometimes I’ll want to transform an arbitrary value.

The transforms work perfectly for canvas. I was just using them wrong :slight_smile:
I’ve now used GetWorldCorners to get the rect center in world space, calculated a difference vector there and then used the VectorTransform to take it back to local.
Everything is awesome.