Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


lossyScale

The global scale of the object (Read Only).
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public Vector3 lossyScale { get; }

Remarks

Please note that if you have a parent transform with scale and a child that is arbitrarily rotated, the scale will be skewed. Thus scale can not be represented correctly in a 3 component vector but only a 3x3 matrix. Such a representation is quite inconvenient to work with however. lossyScale is a convenience property that attempts to match the actual world scale as much as it can. If your objects are not skewed the value will be completely correct and most likely the value will not be very different if it contains skew too.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { print(transform.lossyScale); }}