I am trying to figure out the height of my model to place gui health bars on top of it. The problem is every method I have tried returns 0 as the height. Here are some things I have tried. Help would be much appreciated.
height = (int)GetComponent().bounds.extents.y;
height = (int)GetComponent().bounds.size.y;
height = (int)GetComponent().mesh.bounds.size.y;
I tried these with MeshRenderer and MeshFilter.