I want to see the size of the currently selected objects in the Unity Inspector, however I can't seem to find how to add it. Currently when I select a model in my scene, the Inspector panel shows info about its position, rotation and scale, but not the size of the object.

What I want to achieve is to create a scene so that the objects in this scene have the correct proportions to each other, i.e. if a human has a size of 1.8 'units', an example car should be about 5 units long.

  • \$\begingroup\$ You need to model to scale. \$\endgroup\$ – user15805 Jan 22 '15 at 14:27

Do you really need the actual size in units? I mean, you can use the scale of your game objects to scale them up and down to create realisitics size relations between your objects.

If you are creating your own 3d assets, you might want to handle the size of your models directly in your 3d model creation software and leave the scale to 1 in Unity (for instance, this thread explains how to set up 3ds Max to work with Unity).

Finally, a GameObject does not really have a size itself, however, a mesh does. If your GameObject has a Mesh component, you can get the mesh axis aligned bouding box with Mesh.bounds (or Render.bounds) that will give you a Bounds object that contains useful data like the size of the bounding box.

If you want to show it in the inspector, you might want to extend the editor to display anything you want from the previously requested Bounds object.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.