Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Transform.localScale

Switch to Manual
public Vector3 localScale;

Description

The scale of the transform relative to the parent.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { // Widen the object by 0.1 transform.localScale += new Vector3(0.1F, 0, 0); } }