unity how to get transform scale

C#
// This returns the scale of the object the script is attached to.
transform.localScale
Source

Also in C#: