Unity Basics
  • Welcome
  • Getting Started with Unity Software
  • Helpful Shortcuts
  • The Unity Software Interface
    • The Default Interface
    • The Windows (Tabs)
      • Hierarchy Window
      • Scene Window
      • Project Window
      • Inspector Window
      • Game Window
      • Console Window
    • Other Layouts
      • Create a Custom Layout
  • Create
    • Creating Game Objects
      • 3D Primitives
      • Creating Game Objects in the Editor
      • Spawning Objects
      • Unhiding/Hiding Objects During Gameplay
      • Parenting
    • Creating Assets
    • Creating Components and Scripts
      • Adding Components in the Inspector
      • Creating Custom Components and Scripts
    • Creating Prefabs
  • Select and Update
    • General Selection
    • Search and Focus
    • Updating Game Objects
      • Updating Game Objects in the Editor
      • Updating Prefabs
    • Updating Assets
    • Updating Components
      • Update Components in the Inspector
      • Accessing Components Through Scripts
  • Delete
    • Deleting Game Objects
      • Deleting and Disabling Objects in the Editor
      • Using the Destroy() Function
    • Deleting Components and Scripts
      • Disabling and Removing Components in the Editor
      • Disabling and Removing Components During Gameplay
  • Translate, Rotate, and Scale
    • Intro to Transforms
    • Handy Transform Shortcuts
    • Translate
      • Positioning Game Objects in the Editor
      • Updating Position Through Script Code
      • Using the Transform.Translate() Function
    • Rotate
      • Rotating Game Objects in the Editor
      • Updating Rotation Through Script Code
      • Using the Transform.Rotate() Function
    • Scale
      • Resizing/Scaling Objects in the Editor
      • Updating Scale Through Script Code
    • Controlling Speed
    • Common Issues with Transforms
  • Materials
    • Material Basics
      • Creating and Applying Materials
      • Accessing Materials Through Code
  • Physics
    • Physics Basics
    • Colliders and Triggers
      • Collider Component Overview
      • Accessing Colliders Through Scripts
      • Common Issues: Colliders and Triggers
    • Rigidbody Component
      • Rigidbody Component Overview
      • Accessing the Rigidbody Component Through Scripts
      • Common Issues: Rigidbody Components
    • Common Issues: Physics and Velocity
  • Interaction
    • Interaction Basics
    • Keyboard Controls
    • Mouse Controls
  • Coding Basics
    • Intro to Scripts
    • Variables
    • Conditionals (If / Then / Else)
    • Arrays
    • Loops
    • Functions
Powered by GitBook
On this page
  • Overview
  • Resetting the Size
  • Resize Objects in the Scene Tab
  • Resizing Objects in the Inspector

Was this helpful?

  1. Translate, Rotate, and Scale
  2. Scale

Resizing/Scaling Objects in the Editor

PreviousScaleNextUpdating Scale Through Script Code

Last updated 4 years ago

Was this helpful?

Overview

Every game object within a scene listed in the window has a Transform component shown in the window:

Here, we see the local scale's x, y, and z sizes in game units. For scale, the objects will grow and shrink from the middle unless otherwise specified by the developer. Generally, the x-axis is horizontal, the y-axis is vertical, and the z-axis is forward and back.

Since you can change the view of your Scene window and move cameras with their own transform components, the best way to determine an axis is to move the object with the transform vectors and watch the numbers in the component OR change the numbers and watch the object in the Scene View.

Resetting the Size

You'll notice when you add a new game object, it will often have a size that isn't 1 x 1 x 1. Right-click on the Transform component or click the three dots on the right of the component in the Inspector to get this menu:

Here, Reset resets all the coordinates to (0,0,0) (position and rotation) and 1 x 1 x 1 (scale) or you can click Reset Scale for just the local scale of the object in game units to 1 x 1 x 1.

This will only reset the object's local scale relative to its parent object. To reset to the game's (or global/lossy) scale of 1 x 1 x 1, move the object outside of any parent object in the Hierarchy window, reset the scale, then put it back where it belongs. This also updates the local reset scale to whatever new size the object has when placed back into the parent object.

Resize Objects in the Scene Tab

Click the Scale Tool at the top left of the editor.

A quick way to select this is to press the R key on your keyboard.

You can click and drag on the red, green, or blue vectors (colored blocks) to grow and shrink the object along the x, y, or z axes respectively. As you do so, you'll notice the numbers changing in the scale property in the Transform component.

Click and drag where the axes intersect to resize the entire object.

Resizing Objects in the Inspector

Just like in all components with number properties, you can adjust numbers by clicking and dragging your cursor over the property name. You must first hover over the property name (X, Y, or Z) to make arrows appear around the cursor. Once your cursor moves out of frame, it will reenter on the other side. The numbers should increase and decrease and you should notice the object growing and shrinking in the Scene View.

In the Transform component, you can also type in the exact size in game units you need. The object's size will match.

Make sure all values for Scale are positive to avoid errors.

This will make scaling vectors appear on the selected object in the View:

Scene
Hierarchy
Inspector
Click and drag a colored block to resize the object along the axis.
Click and drag left and right over the axis label to update the value or type in coordinates.