title: Searching for a point on the local coordinate system
body: <p><strong>First variant (1):</strong></p>
  <ul>
  <li>global and local coordinate system are the same</li>
  <li>I know the coordinates of the center of the element</li>
  <li>finding the coordinates for A and B is:</li>
  </ul>
  <p><em>Code for obj:</em></p>
  <pre><code>RectTransform rectTransform = obj.GetComponent(typeof(RectTransform)) as RectTransform;
  if (rectTransform == null) rectTransform = obj.AddComponent(typeof(RectTransform)) as RectTransform;
  Vector3 point = new Vector3(obj.transform.position.x (+-) rectTransform.transform.localScale.x / 2, obj.transform.position.y, obj.transform.position.z)
  </code></pre>
  <p><strong>Now the question is how to do it for the second variant? (2)</strong></p>
  <p><code>Position</code> and <code>LocalScale</code> works on the global system, so I have no way to look for a point using the coordinate system assigned to an element</p>
  <p><strong>I would like to add that this object can be freely rotated and scaled on all axes in space</strong></p>
  <p><a href="https://i.stack.imgur.com/7erkM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7erkM.jpg" alt="enter image description here" /></a></p>