Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Editor: how to scale everything?

Discussion in 'Getting Started' started by LinuxDevJ, Feb 28, 2021.

  1. LinuxDevJ

    LinuxDevJ

    Joined:
    Sep 26, 2020
    Posts:
    23
    When I search the forums, I mostly find solutions for in-game scaling problems. I have started my first project and invested hours with several dozen objects. I found out, thet my transform values in the inspector get smaller and smaller and I have to fiddel with fractions and small decimal numbers that become more and more inaccurate (e.g. 0.04325). I guess it was a basic mistake to start with a plane with a size of 1/2/2 .... :(

    I wonder how I can tell Unity Editor to scale the complete scene by a factor of 10 so that all values in the inspectors get mutliplied accordingly. Is this possible?

    I noticed that when I move objects in the hierarchy unter my main plane, I can scale the plane and the objects below also scale - but the values in the inspector of the objects below the plane didn't change.

    SOmehow I missed some basic rule how to set the size of the plane that contains the whole scene. Is ther a good rule of thumb, e.g. "1" should be 1 mm so that you smalles object would be 1mm with a value of "1"?
     
    Last edited: Feb 28, 2021
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    1. Create a new GameObject at the root level of your scene. Make sure it has position and rotation 0,0,0, and scale 1,1,1.
    2. Drag everything else in the scene into this GameObject.
    3. Now change the scale on that GameObject to 10,10,10.
    4. Drag everything back out.
    5. Delete this GameObject, as it's no longer needed.
    This is because the Transform inspector shows local position, rotation, and scale. Not world values, but only local (i.e. relative to the parent).

    Actually, the "standard" scale is 1 unit = 1 meter. But you can use whatever is convenient.
     
  3. LinuxDevJ

    LinuxDevJ

    Joined:
    Sep 26, 2020
    Posts:
    23
    I did exactly how you describe, but it didn't work: everything scaled up by factor 10. I also moved all objects back out but when I click an object it still has the same values (e.g. its scale didn't change .... still 0.04325). That was basically the same procedure that I did in scaling my main plane where almost all objects are under.

    What I don't understand: I created a new scene with a new plane with scale 1/0.2/2 (x/y/z) , meaning "1m" width, "20 cm" heigt, "2m " depth. But when I add a new Cube and want that to be as wide as the plane with "1m" width, I had to set the transform scale of the Cube to X = "10" instead of the expected "1" ... ? This is totaly confusing as I can't translate a unit "1" to 1m in all objects. Am I missing something here?

    https://docs.unity3d.com/Manual/class-Transform.html doesn't help here to understand this effect.
     
    Last edited: Feb 28, 2021
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    That is working. I thought that's what you wanted to do. If it's not, then I have no idea what you're trying to accomplish.

    I don't believe you. :p Somehow you're not seeing what you think you are seeing.

    Not quite. A plane is 10 by 0 by 10 units. So with those scaling factors, it is now 10 by 0 by 20 meters in size.

    Yes, you just missed that planes are not 1x1 unit in size by default. They are 10x10.