Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

448
Views
Unity Set position of GUI element relative to another element that is on a different canvas

I'm attempting to position a tooltip to be directly below an icon. The structure is:

Main Canvas
- Panel
 - UI Element
Tooltip Canvas
- Tooltip Icon

When mousing over an icon, I'm attempting to set the position of the tooltip to be just under the ui element. How does one get the absolute position of the ui element?

So far I've tried both

float absolute_x = icon.position.x;
or
float absolute_x = icon.anchoredPosition.x;

which only wield the relative position to the main canvas, not the absolute position on the UI.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

First get the Rectransform

public RectTransform UIElement;

then get position relative to the parent canvas

UIElement.localPosition.y
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!