- Home /
Question by
earthsamurie · Apr 30, 2019 at 02:49 PM ·
uipanelboundary
Boundary of panels
Hello! I'm trying to clamp an object 'x' between the main camera's left side and panel. But I need the "bounds.extent.x" of a panel. This was done with 'x' too("transform.GetComponent ().bounds.extents.x;"). But I don't know how to do this with a panel. Can you tell me how I can do this?
Comment
[panel].GetComponent<RectTransform>().rect.x$$anonymous$$in
will give you left x position of panel
Your answer
Follow this Question
Related Questions
How to make UI Panel scale to fit content 2 Answers
ScrollRect resetting scroll position on content change 6 Answers
How to detect click on naked panel? 1 Answer
How to adjust the screen resolution? 0 Answers
Canvas, Scroll Rect, Panels, Panes? 0 Answers