This is no doubt a really dumb question, and is exactly the kind of question you’ve been thinking would be posed by the army of newbies marching towards Unity. At least I haven’t asked how to build WOW or Crysis in a weekend
I have created a Plane. It’s scale is 1x1x1.
I now create a cube. It’s scale is 1x1x1
Why is the Plane exactly 10x larger than the cube?
I’ve searched the forums and Google, but either nobody has posed this question or my search terms aren’t the right ones…
The plane is a 10x10 unit mesh. It was pretty much just an arbitrary decision to make it that size but was also given that scale since most people will throw it in the scene to use as a quick floor or wall.
Short answer, no. The cube is still 1x1x1, the plane is still 10x10, and there’s still no good explanation for this. However, a couple of versions ago, they added a “quad” primitive on that menu, which creates a 1x1 “plane”.
As for the actual size, you can, in code, get the bounding box of the renderer, which is about as close to the “real size” as you will be able to get. You could even an extension method for the Transform inspector to display this info in the IDE.
And finally, five years and 8 days. Impressive necropost… even more impressive that the issue is still valid!
And yes this problem has been solved. Use this free thingy from the asset store:
It lets you view and set the absolute sizes of an object by entering values in the field, and it has a button to “fix” the model by setting your inputted value as the default scale (ie, the object will be that absolute size when its scale is set at 1,1,1)
it can’t integrate fully with the transform dialog, i don;'t think that’s possible with unity extensions. but you can use it to fix the default scale of objects to 1^3 units so that the “scale” field in the transform properties becomes meaningful
Not a dumb question at all. Had me scratching my head too. This seems like a really bad decision on behalf on the developers. Units should be consistent but aren’t.
The units are consistent, they just added in the plane as a primitive with a weirdly large mesh - the ‘scale’ is a multiplier for the size of the mesh, not the absolute size of the object. And we have again necroposted this, another year later, and still this stupid oversized Plane primitive exists!
As before, though, just use the Quad primitive instead, which is 1x1 like it should be.
For what it is worth (now 12years and 3 months from initial post) this issue has cost me about 12 hours debugging, yesterday and today. I had a plane scaled to 10,1,10 and assumed it was 10 x 10. I could not work out why my player driving to random points ranging for X and Z between +/- 10, would just stay near the center of the plane.
NOW I know why! The plane is really 100 x 100!! This really is a trap for young ‘players’ and is contrary to several tutorial videos I’ve watched. One commentary I remember is ,“units can be whatever you want in Unity”, but generally people assume 1 means 1 metre". (Except if you’re a plane, then 1 means 10 meters!!!)
You don’t quite have it. This doesn’t have anything to do with whether a unit is a meter or an inch. The “Plane” object’s mesh data is 10 units wide, regardless of what those units mean. The object’s scale is a multiplier for the size of the mesh data.
It is true that the Plane object being so out of sync with the other primitives is silly, and there’s no reason for the Plane primitive to still exist, and confuse rookies with its oddball scale - particularly since the Quad primitive exists and does exactly the thing that people tend to assume that the Plane primitive does.
The necro thread that just won’t die.
There is an issue with using the quad as a plane replacement: It’s modeled on XY and not XZ. That is, it appears in the scene as a wall and not a floor. Sure, you can rotate it, but you have to remember that when working with it, or drop it into an empty object and deal with the container.
its 2023 folks, this thread must live on as long as the issue still resides in Unity. I found this in the asset store that could help for any folks out there who wanna make something realistic per say but it costs 10€…
Ok, in an effort to finally put this thread down for good, I made a little Editor extension to show me the actual size of objects in unity, based off the renderer.
This method probably isn’t perfect, but it seems to work well enough for me, and at the very least allows me to see when the scale is not what it appears to be. The code for this, (again, based off the code in the linked post):
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
[CustomEditor(typeof(Transform), true)]
[CanEditMultipleObjects]
public class CustomTransformInspector : Editor
{
//Unity's built-in editor
Editor defaultEditor;
Transform transform;
void OnEnable()
{
//When this inspector is created, also create the built-in inspector
defaultEditor = Editor.CreateEditor(targets, Type.GetType("UnityEditor.TransformInspector, UnityEditor"));
transform = target as Transform;
}
void OnDisable()
{
//When OnDisable is called, the default editor we created should be destroyed to avoid memory leakage.
//Also, make sure to call any required methods like OnDisable
MethodInfo disableMethod = defaultEditor.GetType().GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
if (disableMethod != null)
disableMethod.Invoke(defaultEditor, null);
DestroyImmediate(defaultEditor);
}
public override void OnInspectorGUI()
{
EditorGUILayout.LabelField("Local Space", EditorStyles.boldLabel);
defaultEditor.OnInspectorGUI();
//Show World Space Transform
EditorGUILayout.Space();
GUI.enabled = false;
EditorGUILayout.LabelField("World Space", EditorStyles.boldLabel);
EditorGUILayout.Vector3Field("Position", transform.position);
EditorGUILayout.Vector3Field("Rotation", transform.rotation.eulerAngles);
EditorGUILayout.Vector3Field("Scale", transform.lossyScale);
Renderer[] renderers = transform.GetComponents<Renderer>();
Vector3 size = Vector3.zero;
foreach (Renderer r in renderers)
{
size += r.bounds.size;
}
if (renderers.Length > 0)
{
EditorGUILayout.Vector3Field("Actual Total Size", size);
}
GUI.enabled = true;
}
}
(to get it to work, make sure to put this script in a folder called “Editor” in your assets folder)