2
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ You need to model to scale. \$\endgroup\$
    – user15805
    Jan 22, 2015 at 14:27
  • \$\begingroup\$ I understand your point, really embarassing that it cannot be seen. It would be easier to set the size by typing in than setting them visually. That's a hell. \$\endgroup\$
    – Estevez
    Feb 21, 2021 at 12:44

1 Answer 1

2
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .