1

I want to make a responsive image cropper in the canvas. But the main problem is that I cannot find any function in Unity API that help me to convert anchored position to another anchored position with deferent anchor. So is there any method for that?

1 Answers1

1

RectTransform.anchoredPosition is the property you're looking for.

Hasnain Shaukat
  • 371
  • 2
  • 10
  • https://docs.unity3d.com/ScriptReference/RectTransform-anchoredPosition.html – Hasnain Shaukat Aug 11 '22 at 05:26
  • 1
    You misunderstood my question I want to convert RectTransform.anchoredPosition to other anchor, I mean if there is a method I gave it the current anchored position with it's anchor and the destination anchor to get the anchor position relative to the distention anchor. – Mahmoud Kanbar Aug 11 '22 at 18:55