- Home /
How do I get a RectTransform position relative to another that is not the parent?
I am pooling expensive layouts and want to know if a RectTransform is visible inside a scrollView. I am using ScreenSpace-Overlay.
Originally, I was using content.anchoredPosition. But now, I want do this with a child of a child of content. So: Scroll>Viewport>Content>Panel>PooledItem
how can I find what the relative position between the PooledItem and the Viewport?
I tried using transform.position, but then I have to incorporate the Canvas position and the CanvasScaler. Subtracting one position from the other gives me the delta, but in world coordinates.
Your answer
Follow this Question
Related Questions
Get the position of a RectTransform relative to Canvas 1 Answer
Change position of a text prefab added to a world space canvas via scripting 0 Answers
Where to find original unity Parent/Child script? 2 Answers
Find Child's Position Relative To World (Global Position) 1 Answer
Add force to Child while it's parent rotate around something..... 0 Answers