Hello,
This question has been posed numerous times in various contexts, but I do not know that a solution has ever been found. I have not encountered one.
I have a menu with 3D text, and I have a box collider of nominal dimensions to detect mouse events (hover and click). So far, so good, except that I would like to size my box colliders according to the size of the text, not nominally. The text itself comprises a mesh, and the most obvious solution would be to read the size of the text from the top left vertex to bottom right vertex, then resize the box collider accordingly. However, I cannot find a way to do this.
Does anybody know how? I am using C#.
Thank you in advance,
Peter