Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

UI position set to wrong coords

$
0
0
So im try to create a tooltip that will will be displayed at the bottom right corner of the object the script is assigned to but I am having some odd issue with the position of the tooltips RectTransform.

Here is the code that sets the position of the tool tip:
Code (CSharp):
  1. RectTransform gameObjectsRect = gameObject.GetComponent<RectTransform>(); //The RectTransform the script is attached too
  2.         Vector2 pos = new Vector2(gameObjectsRect.position.x + gameObjectsRect.rect.width/2,...
UI position set to wrong coords

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>