Transform.localScale 自身缩放
var localScale : Vector3
Description描述
The scale of the transform relative to the parent.
相对于父级物体变换的缩放。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {transform.localScale += new Vector3(0.1F, 0, 0);}}
// Widen the object by 0.1//扩大物体的x轴向0.1个单位transform.localScale += Vector3(0.1,0,0);