How to get a height, width, and depth of imported FBX model

Hi

I’m trying to get a height, width, and depth of imported FBX model.
(I mean, height, width, and depth of Bounding box around the FBX model)
The FBX model was exported from Google Sketchup pro.
It was successfully impoted in Unity.

I found a related topic as below:
http://forum.unity3d.com/threads/21402-Changing-a-Primitive-s-Width-and-Height

He used localScale to get a height and width from primitive object, but FBX’s scale parameters, x,y,z were “1” when it was imported.

I guess, it might be possible to calculate the height, width, and depth using max/min vertex position of the FBX. But I had no idea about that.

Does anybody have any ideas?
I use Unity3.4.

Best regards

I haven’t done this myself but I think this will work.

So get a reference to the MeshFilter attached to your model and then access mesh.bounds, this will give you the local space bounding volumes. If you want world space go through the Renderer component.

Thanks It works!