Hi. How can I convert an object’s Bounds.size into pixels (and then adjust that number based on an object’s position relative to the camera)? I am trying create a button that covers an object?
Thanks
Hi. How can I convert an object’s Bounds.size into pixels (and then adjust that number based on an object’s position relative to the camera)? I am trying create a button that covers an object?
Thanks
Calculate the eight points of the bounds in 2D with Camera.WorldToScreenPoint, then find xmin, xmax, ymin and ymax, and finally the rect.